• 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: Window "snapping" to main screen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Window "snapping" to main screen
      • From: Eric Matecki <email@hidden>
References: 
 >Window "snapping" to main screen (From: Eric Matecki <email@hidden>)
 >Re: Window "snapping" to main screen (From: Eric Matecki <email@hidden>)
 >Re: Window "snapping" to main screen (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Window "snapping" to main screen
  • Next by Date: Re: Minimal document-based app
  • Previous by thread: Re: Window "snapping" to main screen
  • Next by thread: Re: Window "snapping" to main screen
  • Index(es):
    • Date
    • Thread