• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWindow Level Side Effect - PopUp to Normal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSWindow Level Side Effect - PopUp to Normal (From: Caylan Larson <email@hidden>)
 >Re: NSWindow Level Side Effect - PopUp to Normal (From: Ken Thomases <email@hidden>)
 >Re: NSWindow Level Side Effect - PopUp to Normal (From: Caylan Larson <email@hidden>)

  • Prev by Date: Re: NSWindow Level Side Effect - PopUp to Normal
  • Next by Date: NSOutlineView subclass not firing data source drag and drop methods
  • Previous by thread: Re: NSWindow Level Side Effect - PopUp to Normal
  • Next by thread: NSOutlineView subclass not firing data source drag and drop methods
  • Index(es):
    • Date
    • Thread