Re: Window positioning and screen resizing
On May 14, 2013, at 00:09 , John Joyce wrote: > 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. Thanks, John. I'm fairly familiar, at this point, with the various screen change notifications available. It's just that if I want to take action when the screen changes, I don't want to be fighting with the OS to position my windows. -- Rick ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Window positioning and screen resizing
On 2013/05/14, at 9:57, Rick Mann 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 (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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Window positioning and screen resizing
On May 13, 2013, at 23:19 , Ken Thomases wrote: > I believe the top-left corner is kept in the same relative position to the > top-left corner of the screen, unless that would leave part of the window > off-screen. If it would, then the top-left corner is moved to get the window > fully on-screen, unless the window is too large to fit entirely on screen. > In that case, the top-left corner is moved to a few pixels in from the > top-left corner of the screen (excluding the menu bar). I don't recall if > the window is resized to fit on the screen or just left with its bottom > and/or right side off the screen. Thanks, Ken. It seems like it keeps windows pegged to the nearest corner. I haven't tried it with windows larger than a screen quadrant, only a tiny window. -- Rick ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Window positioning and screen resizing
On May 13, 2013, at 7:57 PM, Rick Mann 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). I believe the top-left corner is kept in the same relative position to the top-left corner of the screen, unless that would leave part of the window off-screen. If it would, then the top-left corner is moved to get the window fully on-screen, unless the window is too large to fit entirely on screen. In that case, the top-left corner is moved to a few pixels in from the top-left corner of the screen (excluding the menu bar). I don't recall if the window is resized to fit on the screen or just left with its bottom and/or right side off the screen. > Is this documented somewhere? I couldn't even think of how to search for this > (my feeble attempts turned up nothing). I could swear I've seen a rough description of this somewhere, but I'm not finding it now. Regards, Ken ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Window positioning and screen resizing
On May 13, 2013, at 21:58 , Rick Mann wrote: > In any case, it would be helpful to me to know. So try it with a random sampling of 20 window sizes and positions, and log the window and screen frames before and after the screen change. If you post the results here on this list, someone may spot a pattern. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Window positioning and screen resizing
On May 13, 2013, at 19:12 , Seth Willits wrote: > I can't imagine why it would be documented anywhere. Is there some reason you > need to know what it's doing? Yes. But I'm reluctant to talk about it just yet. In any case, it would be helpful to me to know. -- Rick ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Window positioning and screen resizing
On May 13, 2013, at 5:57 PM, Rick Mann 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). I can't imagine why it would be documented anywhere. Is there some reason you need to know what it's doing? -- Seth Willits ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Window positioning and screen resizing
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 ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com