Re: NSPanel doesn't reposition correctly after screen resize

2013-09-04 Thread Steve Mills
On Sep 3, 2013, at 16:11:01, Lee Ann Rucker wrote: > 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 > sha

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Steve Mills
On Sep 3, 2013, at 12:16:23, Kyle Sluder wrote: > Long story short, Steve, the struts aren’t as useful as you think they are. > If you're already using a custom view in your status items, you can get the > behavior you want by sending -window to the custom view during mouse > tracking, and add

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Keary Suska
On Sep 3, 2013, at 9:27 AM, Steve Mills wrote: > We have an NSPanel that doesn't stay stuck to the menubar if you make the > screen bigger. If you make the screen smaller, it goes through > constrainFrameRect:toScreen and does the right thing. In the nib, the window > has the strut set between

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Steve Mills
Aha, I just found this in the docs for isMovable: A non-movable window will not be moved or resized by the system in response to a display reconfiguration. (I was looking for something about this in setIsMovable, which is where I expect key information like this to be mentioned, since that's the

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Steve Mills
On Sep 3, 2013, at 15:34:25, Lee Ann Rucker 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

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Lee Ann Rucker
NSApplicationDidChangeScreenParametersNotification It doesn't have userInfo, so you'll still have to save the last known screen bounds yourself. On Sep 3, 2013, at 12:57 PM, Steve Mills wrote: > Aha, I just found this in the docs for isMovable: A non-movable window will > not be moved or resiz

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Lee Ann Rucker
On Sep 3, 2013, at 1:50 PM, Steve Mills wrote: > On Sep 3, 2013, at 15:34:25, Lee Ann Rucker 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

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Kyle Sluder
On Tue, Sep 3, 2013, at 01:50 PM, Steve Mills wrote: > On Sep 3, 2013, at 15:34:25, Lee Ann Rucker wrote: > > > NSApplicationDidChangeScreenParametersNotification > > > > It doesn't have userInfo, so you'll still have to save the last known > > screen bounds yourself. > > Hmm. This seems no di

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Steve Mills
On Sep 3, 2013, at 11:28:50, Keary Suska wrote: > Are you simply complaining out loud, or are you unfamiliar with the Cocoa > drawing system? If it is the latter, all things will be made clear by reading > this doc: > https://developer.apple.com/library/mac/documentation/cocoa/conceptual/Cocoa

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-03 Thread Kyle Sluder
On Sep 3, 2013, at 9:28 AM, Keary Suska wrote: > On Sep 3, 2013, at 9:27 AM, Steve Mills wrote: > >> We have an NSPanel that doesn't stay stuck to the menubar if you make the >> screen bigger. If you make the screen smaller, it goes through >> constrainFrameRect:toScreen and does the right thi