#3259: Bug in setting "Always Show Triggers" --------------------------------+---------------------------- Reporter: humdinger | Owner: leavengood Type: bug | Status: assigned Priority: normal | Milestone: R1 Component: Preferences/Menu | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All --------------------------------+---------------------------- Comment (by leavengood): I decided to start looking at this again. I hacked up a solution but it is not very nice. Basically since BWindow opens the menu bar when Alt-Esc is pressed, I stored the fact that the keyboard opened the menu in a boolean in BWindow. I then check that when drawing triggers in BMenuItem, and then reset it to false when BMenuBar is done tracking the menu. It definitely works but is obviously not ideal. Unfortunately trying to pass some sort of boolean to StartMenuBar to indicate it was started with the keyboard is also quite tricky for two reasons: 1) The signature of StartMenuBar cannot be changed without breaking Deskbar (and I even tried fixing it without much success.) Though at this point this is something we can and probably should fix in another way, like just making StartMenuBar public. I don't think that would break compatibility, but if I'm wrong let me know. 2) The menu tracking code is messy, as said in previous comments here. Even if I could pass in the "was started with the keyboard" boolean to the menu tracking code, somehow passing that in to all the submenus does not seem that easy. Also since it has never really been used the trigger handling code is a bit buggy. For example it doesn't close the menu when it triggers an item, and when I tried fixing it there were still issues. It also doesn't trigger submenus. I did some tests in BeOS and there are definitely a lot of things we need to fix in our menu handling to match even what BeOS did. Though I did discover a pretty major bug which seemed to cause a deadlock when using triggers. I'm documenting the BeOS behavior (the good and the bad) so we can try to copy the good but not the bad :) But I think to fix this properly we need a proper menu state tracker class which Stephan mentioned at some point. -- Ticket URL: <http://dev.haiku-os.org/ticket/3259#comment:9> Haiku <http://dev.haiku-os.org> Haiku - the operating system.