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

  • From: "Pete" <trac@xxxxxxxxxxxx>
  • Date: Fri, 04 Nov 2011 23:40:43 -0000

#7182: Fixing Menu keyboard navigation
----------------------------------+----------------------------
   Reporter:  Pete                |      Owner:  stippi
       Type:  bug                 |     Status:  assigned
   Priority:  normal              |  Milestone:  R1
  Component:  Kits/Interface Kit  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  1                   |   Platform:  All
----------------------------------+----------------------------

Comment (by Pete):

 Replying to [comment:17 stippi]:
 > I've looked at the patch, but I am not familiar with the code enough to
 have an opinion on your changes. You've removed some functionality and the
 related comment "Seems not needed and to work better without!" does not
 make me feel confident you really understood the purpose of the disabled
 code.
 It's a while back now, but as I remember if I left that code in, the state
 could still get out of sync with the mouse.  Removing it prevented that
 and I could find no undesirable effects.

 > Doing changes in this code without fully understanding it tends to
 produce unintended side effects. For example, at least in the Mouse
 preflet, no BMenuField works anymore by clicking once to open and clicking
 again to pick a menu item.
 Hmm. I see that.  However, it's not a result of this patch, because it
 also happens if I boot my vanilla alpha-3 stick!  It's not apparent in an
 earlier partition (~40241), nor in one that just has my ealier popup menu
 patch.  I suspect it came in with the first version of the keyboard
 navigation patch, which you applied in r42004, but I can't verify that.

 Note though that the glitch seems exclusive to the Mouse preflet.  I've
 tried a few others, like E-mail and Fonts, and the MenuFields work
 perfectly correctly in those.  So the clash must be with that preflet
 itself.

 > So I don't feel confident in applying your newest patch while I don't
 understand this code fully myself and your comments don't suggest you
 fully understand this either.
 I think that's probably true! (:-/)  Is there anybody still around who
 ''does'' fully understand the menu code, though?

 I suspect a regression to before r42004 wouldn't really help, because
 keyboard navigation was severely broken before.  Though if nobody ever
 uses K/B navigation (I certainly don't) maybe having all mouse-menus work
 is more important for now.

 > My solution to the problem would be to rewrite this whole thing
 properly, in an object oriented way, but I have no time. If you want to
 provide a patch for the one item menu problem specifically, that would be
 fine.
 I'm sure that;s the best ultimate solution, but I don't really want to get
 involved in the menus again right now either, I'm afraid.

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

Other related posts: