• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa not multi-monitor friendly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa not multi-monitor friendly


  • Subject: Re: Cocoa not multi-monitor friendly
  • From: Dave Camp <email@hidden>
  • Date: Tue, 22 Oct 2002 11:53:01 -0700

Yes, my second monitor is to the left of my main monitor.

Thanks for the tip. I will put that to good use in my code. However, it does not help me as I use any other Cocoa app, like any of the ones from Apple... ;-)

Can you say if this is being addressed in a future OS release? I'm not looking for details here, just confirmation that at some point in the hopefully not too distant future the frameworks will be fixed and this will magically start working in existing Cocoa apps.

Thanks,
Dave

On Tuesday, October 22, 2002, at 11:19 AM, Ali Ozer wrote:

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



---
The path of least resistance, it's not just for electricity any more.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Cocoa not multi-monitor friendly
      • From: Ali Ozer <email@hidden>
References: 
 >Re: Cocoa not multi-monitor friendly (From: Ali Ozer <email@hidden>)

  • Prev by Date: Can't find Framework
  • Next by Date: Re: NSScanner bug?
  • Previous by thread: Re: Cocoa not multi-monitor friendly
  • Next by thread: Re: Cocoa not multi-monitor friendly
  • Index(es):
    • Date
    • Thread