[haiku-bugs] Re: [Haiku] #9576: If a window closes while the user is CLICKING on a menu, the menu is still there

  • From: "leavengood" <trac@xxxxxxxxxxxx>
  • Date: Thu, 06 Jun 2013 04:43:03 -0000

#9576: If a window closes while the user is CLICKING on a menu, the menu is 
still
there
----------------------------------+----------------------------
   Reporter:  waddlesplash        |      Owner:  nobody
       Type:  bug                 |     Status:  assigned
   Priority:  normal              |  Milestone:  R1
  Component:  Kits/Interface Kit  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  All
----------------------------------+----------------------------

Comment (by leavengood):

 Replying to [comment:5 jscipione]:
 > Since pushing Cmd+W does not close a window when you have a menu open I
 think that the correct behavior should be to not allow the window to close
 programatically either.

 Cmd-W or other shortcuts not working while a menu is open is a side effect
 of the menu implementation, where the open menu eats all the keyboard
 input, even though in theory it should be perfectly fine to use a shortcut
 like Cmd-W while a menu is open and have it be directed to the owning
 window (it works in Mac OS X.)

 I'm pretty sure I looked into fixing this once but as you've seen the menu
 code is a mess, and very hard to understand.

 This bug is probably also difficult to fix cleanly, and I agree the best
 solution is to close the menu when the owning window closes.

 I've wanted to just scrap the menu code and try starting over (Stephan has
 had a similar idea too) but it would help to have some sort of automated
 or semi-automated test suite first. The API design makes it difficult to
 fix cleanly, because BMenuBar is a menu, and BMenuField uses a menu,
 BMenus can contain other BMenus, then there is BPopupMenu, etc. When you
 fix one, you can break another, as I'm sure jackburton can attest to.

 But there are many menu bugs and just bad UI because of this
 implementation, and it is an important part of the user experience so it
 might be worth spending the time on to fix it.

 At this rate we can't just say we'll wait until after R1 and break the
 API, since R1 isn't really a reality yet.

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

Other related posts: