FIXED: offscreen color bug

hi all

in october 2000, Erin Harley reported a bug. Drawing to offscreen windows
referenced to screen 1 was often wrongly colored. That bug is now fixed.
The new version of SCREEN.mex is enclosed. This fixed version will be
included in the forthcoming Psychtoolbox version 2.5.
http://groups.yahoo.com/group/psychtoolbox/message/266
http://groups.yahoo.com/group/psychtoolbox/message/881

i'm also including a test program, DrawTest.m, that tests for this
problem, revealing the bug in version 2.44 and giving a clean bill of
health to version 2.5.

best

denis

p.s.
The problem stemmed from the fact that Apple's QuickDraw operations use
the color table of the current DEVICE (not the current port). This raised
no issues if you were using any on-screen window, or an off-screen window
associated with screen 0, which is usually the current device, but became
an issue when you used an offscreen window associated with another
screen. We've now enhanced a humble C routine called SetWindow to also
make the offscreen window's device the current device. That fixed the bug.

NOTE TO ALL: denis.pelli@... is my preferred email address. Please
use that address. My "verizon.net" address will go away soon, partly
because Verizon forces me to use that as my "From:" address. My current
email program won't allow me to designate a separate "Reply-to:" address.