• 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: NSPanel doesn't reposition correctly after screen resize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPanel doesn't reposition correctly after screen resize


  • Subject: Re: NSPanel doesn't reposition correctly after screen resize
  • From: Lee Ann Rucker <email@hidden>
  • Date: Tue, 03 Sep 2013 14:11:01 -0700

On Sep 3, 2013, at 1:50 PM, Steve Mills wrote:

> On Sep 3, 2013, at 15:34:25, Lee Ann Rucker <email@hidden> wrote:
>
>> NSApplicationDidChangeScreenParametersNotification
>>
>> It doesn't have userInfo, so you'll still have to save the last known screen bounds yourself.
>
> Hmm. This seems no different than the NSWindowDidChangeScreenNotification other than it's app-centric rather than affecting each actual window. Not all that helpful really.

NSWindowDidChangeScreenNotification is sent when the window moves to another screen. NSApplicationDidChangeScreenParametersNotification is when the screen itself changes. You'll probably have to listen to both of them, but they can share code.

>
> How does Apple do it? They obviously have to move the windows to keep them relative to the top of the screen, to deal with the dopey bottom-up coordinate system they went with.


If you look at the result of stringWithSavedFrame, it includes the window's screen frame. This is how restoration (old and new) adjusts when a window restores to a different screen configuration. It wouldn't surprise me if they're keeping the screen frame saved somewhere internally too.


_______________________________________________

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: NSPanel doesn't reposition correctly after screen resize
      • From: Steve Mills <email@hidden>
References: 
 >NSPanel doesn't reposition correctly after screen resize (From: Steve Mills <email@hidden>)
 >Re: NSPanel doesn't reposition correctly after screen resize (From: Keary Suska <email@hidden>)
 >Re: NSPanel doesn't reposition correctly after screen resize (From: Kyle Sluder <email@hidden>)
 >Re: NSPanel doesn't reposition correctly after screen resize (From: Steve Mills <email@hidden>)
 >Re: NSPanel doesn't reposition correctly after screen resize (From: Steve Mills <email@hidden>)
 >Re: NSPanel doesn't reposition correctly after screen resize (From: Lee Ann Rucker <email@hidden>)
 >Re: NSPanel doesn't reposition correctly after screen resize (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: NSPanel doesn't reposition correctly after screen resize
  • Next by Date: Re: Threadsafe copy of objective c object
  • Previous by thread: Re: NSPanel doesn't reposition correctly after screen resize
  • Next by thread: Re: NSPanel doesn't reposition correctly after screen resize
  • Index(es):
    • Date
    • Thread