> 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 protected])
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 [email protected]