Re: NSPanel doesn't reposition correctly after screen resize
Re: NSPanel doesn't reposition correctly after screen resize
- Subject: Re: NSPanel doesn't reposition correctly after screen resize
- From: Steve Mills <email@hidden>
- Date: Tue, 03 Sep 2013 12:34:52 -0500
On Sep 3, 2013, at 12:16:23, Kyle Sluder <email@hidden> 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 adding your popup window as a child window.
Thanks for addressing the actual question, Kyle, and for the info about the struts being useless in this case (we programmatically position it to the default position, then it gets restored to the last known position, or something like that). This isn't a popup window - you might be thinking of an earlier problem I was working on. This is just a palette that floats onscreen, most often positioned right beneath the menubar. It has setMovable set to NO, because we need to handle window snapping when the user drags the window, but that doesn't affect how the window moves programmatically (or at least the docs say "can be dragged by clicking in its title bar or background").
constrainFrameRect:toScreen: is overridden, but it simply calls super if the app is not in fullscreen mode. Our document window is having the same problem when changing screen sizes. Both also position incorrectly upon restoration if the app is being run on a different screen size than when it last quit.
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
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