[haiku-bugs] [Haiku] #7182: Fixing Menu keyboard navigation

  • From: "Pete" <trac@xxxxxxxxxxxx>
  • Date: Tue, 01 Feb 2011 07:10:39 -0000

#7182: Fixing Menu keyboard navigation
----------------------------------+------------------------
   Reporter:  Pete                |       Owner:  axeld
       Type:  bug                 |      Status:  new
   Priority:  normal              |   Milestone:  R1
  Component:  Kits/Interface Kit  |     Version:  R1/alpha2
   Keywords:                      |  Blocked By:
Has a Patch:  0                   |    Platform:  All
   Blocking:                      |
----------------------------------+------------------------
 While working on PopUpMenu, I noticed that there were several problems
 with menu keyboard navigation.  These included the difficulties described
 in #4594, but are more extensive, so I'm filing a new ticket rather than
 extending that one.  Hope that's the approved procedure.
 I'm attaching a patch which seems to fix everything, but please check it
 independently and extensively!

 The bugs were:

 1)  Using Enter or Space to select an item would Invoke() an attached
 message, but never returned a pointer to the item if the app was waiting
 for it.

 2)  Sub-menus were not reachable via the left and right arrow keys.  The
 _Track method would just hang in the loop that waited for mouse movement.

 3)  MenuBar suffered from problems similar to the above, causing #4594.


 (1) was a result of fSelected being cleared before it could be returned to
 the caller.  I solved this by using fChosenItem, which perviously was only
 needed by MenuBar.

 (2) needed passing some extra MENU_STATE_... values around -- added to
 MenuPrivate.h.

 (3) was cured by applying similar mods to MenuBar.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/7182>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: