• 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 positioning and screen resizing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window positioning and screen resizing


  • Subject: Re: Window positioning and screen resizing
  • From: John Joyce <email@hidden>
  • Date: Tue, 14 May 2013 16:09:13 +0900

On 2013/05/14, at 9:57, Rick Mann <email@hidden> wrote:

> It seems that Cocoa or the OS or someone repositions my windows with some rules when the screen resolution changes. Does anyone know what the rules are? Stuff is kept in roughly the same quadrant of the screen, near as I can tell, and perhaps the offset within the quadrant is adjusted by some factor, but it seems to be repeatable (that is, windows don't crawl with repeated changes).
>
> Is this documented somewhere? I couldn't even think of how to search for this (my feeble attempts turned up nothing).
>
> --
> Rick
>
>


NSApplication class has a notification you can observe:

NSApplicationDidChangeScreenParametersNotification

Posted when the configuration of the displays attached to the computer is changed.
The configuration change can be made either programmatically or when the user changes settings in the Displays control panel. The notification object is sharedApplication. This notification does not contain a userInfo dictionary.



Then you can respond according to your app's needs.
Presumably, you should not rely on or infer the logic of what the system does for you, but rather just respond as appropriate for your own needs.
_______________________________________________

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 positioning and screen resizing
      • From: Rick Mann <email@hidden>
References: 
 >Window positioning and screen resizing (From: Rick Mann <email@hidden>)

  • Prev by Date: Document Window Versions Drop-down Menu
  • Next by Date: Re: Window positioning and screen resizing
  • Previous by thread: Re: Window positioning and screen resizing
  • Next by thread: Re: Window positioning and screen resizing
  • Index(es):
    • Date
    • Thread