On May 3, 2010, at 3:31 PM, Eric Gorr wrote:

Using Xcode 3.1.3 (or 2.5), I created a standard Carbon application with a single document window. After running the application, I use the Display System Preferences to move the menubar from one display to another one. The document window for the Carbon application followed the menubar and moved to the other display.

Doing the same thing, but this time with the default Cocoa application, the document window does not automatically move.

I suspect this is done to Carbon apps to keep them from breaking, since otherwise the window's global coordinates would change behind its back. Back in the day (during OS X 10.0 development) there were a lot of problems with having non-app code move Carbon windows, which is one reason why they're not draggable while the app is busy.

So in short, this is a workaround, not a feature. I wouldn't expect an app window to move to follow the menu bar. But maybe your app has some special behavior that makes that behavior desirable? Your idea of the NSApp delegate call seems like a good way to implement that.

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to