Re: NSWindow Level Side Effect - PopUp to Normal
Re: NSWindow Level Side Effect - PopUp to Normal
- Subject: Re: NSWindow Level Side Effect - PopUp to Normal
- From: Caylan Larson <email@hidden>
- Date: Tue, 29 Oct 2013 09:31:29 -0500
> This works great… except when the window nears the main menu. If I get close to the main menu, the child window’s frames start to get limited in upward mobility. This causes drawing bugs. Strangely, the redrawing doesn’t happen until I setFrame: (vs setFrameOrigin). However, dragging is not the only one use case where the main menu breaks the design - it happens when the window resizes vertically and tries to cross the main menu boundary (user drag and user zoom gesture).
I fixed this problem by adding the following snippet to each child NSWindow subclass implementation.
-(NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
{
return frameRect;
}
Of course, I left the default constraint on the main window because it makes sense from the user’s perspective.
Cheers,
Caylan
_______________________________________________
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