Re: NSScreen, CG and fullscreen bug?
Re: NSScreen, CG and fullscreen bug?
- Subject: Re: NSScreen, CG and fullscreen bug?
- From: Dietmar Planitzer <email@hidden>
- Date: Fri, 09 Aug 2002 00:46:23 +0200
>
From: Brian Hook <email@hidden>
>
>
<...>
>
Upon further investigation, I checked the call to [ [ NSScreen
>
mainScreen ] visibleFrame ] and lo and behold, it was reporting 640,480
>
even when I was clearly running at 1280 x 1024.
>
>
Is there a way to "flush" NSScreen and force it to recognize a mode
>
change? Or, alternatively, is it possible that there's some call after
>
going from fullscreen -> windowed that I should be making to sync the
>
rest of Cocoa that I may not be doing? Failing that, any other ideas
>
what might be wrong?
>
<...>
Yeah, this problem sounds familiar to me...
If you use the CG APIs inside a Cocoa app to switch the reslution of the
screen, then you must return to the main event loop right after the switch
but before you open a window on that screen.
I filed a bug with Apple about this (ID #2877602) some time ago and was told
that the AppKit wont notice the mode switch until it has received a mode
switch confirmation message from the window server. In order for the AppKit
to pick up this message you must return to the event loop.
One workaround for this problem might be to put the code which opens the
window into an NSRunLoop delayed performer. I, however, chose to simply
correct the window position by hand...
And yes, it would be nice if the NSScreen class would provide a +reset
method for this kind of stuff as returning to the event loop is not always
an option and can make things, well, complicated.
Regards,
Dietmar Planitzer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.