Michael Austin wrote:
> Working on Windowed mode for a game. I use the following to lock the
> graphics port on the window, and get a handle to the pixmap:
>
> thePort = GetWindowPort (theWindow);
> LockPortBits(thePort);
> pixmap = GetPortPixMap(thePort);
>
> I then do whatever blitting needs to be done, and then I
>
> UnlockPortBits(thePort);
>
> To update window I call:
>
> RgnHandle theRegion = NewRgn();
>
> SetPortWindowPort(theWindow);
> QDFlushPortBuffer (GetWindowPort(theWindow),GetPortVisibleRegion(Get
> WindowPort(theWindow),theRegion));
>
> DisposeRgn(theRegion);
>
> This works Great in OS 10 with no problems at all, however, in OS 9 for
> some unknown reason it writes to the desktop and ignores the window. It
> actually overwrites all other windows and sometimes leaves nasty
> artifacts in the othere windows. A real nightmare.
>
> Anyone see anything obvious I am overlooking?
My Quickdraw is a little rusty, but shouldn't you be setting the device
too? You can use SetGWorld.

-Peter