NSScreen isn't notified of resolution switch
NSScreen isn't notified of resolution switch
- Subject: NSScreen isn't notified of resolution switch
- From: Brian Christensen <email@hidden>
- Date: Thu, 29 Nov 2001 18:09:11 +0100
I have found that after switching resolutions using the CoreGraphics
framework I can't properly position a new NSWindow on the screen, but
only if I have a Panel in my MainMenu.nib file. If I switch the
resolution to 640x480 and create a new window using that size, it is
actually positioned quite a bit off the right and bottom parts of the
screen. It seems that when a Panel is present in the nib file (even if I
don't use it anywhere), then NSScreen doesn't get notified of the
resolution switch, since a call to the [[NSScreen mainScreen] frame]
method still returns the previous screen size I had before the rez
switch. However, if I remove the Panel from my nib file, everything
works properly and NSScreen returns the proper screen size. Does anyone
know what could be causing this problem?
-- Brian
-------------------------------------------------
Brian Christensen <email@hidden>
-------------------------------------------------