Re: Cocoa not multi-monitor friendly
Re: Cocoa not multi-monitor friendly
- Subject: Re: Cocoa not multi-monitor friendly
- From: Ali Ozer <email@hidden>
- Date: Tue, 22 Oct 2002 11:19:36 -0700
I'm trying to open a window on a second monitor. I'm calling [window
setFrame:display]. If I have other windows already open, this works
fine, but if I have no windows open, when I call makeKeyAndOrderFront,
it will force the window on the main monitor.
I logged a bug with Apple about this a while back (3054203) which was
marked as Close/Dup....
I found it by dragging the window of any Cocoa app to my second
monitor, quitting, and re-launching. The window always moves back to
the main monitor. I'm guessing the code that checks that windows are
placed on-screen only checks the coordinates against the main monitor,
not all the monitors.
I believe this bug is limited to windows on the negative screen (if you
have a screen which is to the left of the screen with the menu); and
also, it only occurs when the window is first being brought up. That
is, sending setFrame:display: after the window has been displayed once
seems to be OK.
Assuming this is what you're seeing, clearly one suboptimal workaround
would be to move the window after it's come up; but a better one is to
make the window non-deferred (which you can do in IB); this doesn't
cause the window to be visible earlier than it needs to; but it does
cause the screen-determination code to execute earlier rather than
later, so your setFrame:display: call afterwards does the right thing.
Ali
_______________________________________________
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.