Re: Window "snapping" to main screen
Re: Window "snapping" to main screen
- Subject: Re: Window "snapping" to main screen
- From: Quincey Morris <email@hidden>
- Date: Mon, 07 May 2012 00:39:14 -0700
On May 7, 2012, at 00:30 , Quincey Morris wrote:
> On May 7, 2012, at 00:14 , Eric Matecki wrote:
>
>>> mWindow = [[NSWindow alloc] initWithContentRect: contentSize styleMask: styleMask backing: NSBackingStoreBuffered defer: YES];
>
> I would assume that the content rect is here assumed to be relative to the main screen. Have you tried 'initWithContentRect:styleMask:backing:defer:screen:' instead?
Er…having trouble saying what I mean today…
I meant to say that the content rect is assumed to be relative to the main screen, and windows are constrained to the boundaries of their screen. Presumably specifying the screen via the alternative initializer will cause it to constrain to that screen, and you can use a different contentRect if you want to position it directly.
If you want to defeat the constraining, for a specific screen, you have to subclass NSWindow and override 'constrainFrameRect:toScreen:' to do whatever you want.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden