[haiku-commits] Re: r40306 - haiku/trunk/src/kits/interface

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 28 Jan 2011 19:09:03 -0500

>
> When an application calls Go() on BPopUpMenu it will provide a BPoint
> where the left-top of the menu window should be. Nothing too crazy
> there, with the exception that if the menu would show off the screen,
> it is moved within screen boundaries, which means the left-top is no
> longer at screenPoint, and may in fact be under the mouse cursor. This
> is where things can get messy.


Make the resulting BPopUpMenu always pop up on an edge of the resulting
menu. If there is not enough room for the menu to the right of the BPoint
then draw the menu to the left, if there is not enough room for the menu
below the BPoint, move the menu up. That way, the mouse will never appear on
top of the menu and so you can never accidentally select an item without
moving the mouse.

Other related posts: