After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 149257 - clicking on menu border should not dismiss the menu
clicking on menu border should not dismiss the menu
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.4.x
Other Linux
: Normal normal
: Medium feature
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-08-04 09:04 UTC by Tommi Komulainen
Modified: 2018-02-10 03:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
Menu with exaggerated borders for testing. (534 bytes, text/plain)
2004-08-04 09:06 UTC, Tommi Komulainen
  Details
Proposed fix (628 bytes, patch)
2004-08-09 12:26 UTC, Tommi Komulainen
needs-work Details | Review

Description Tommi Komulainen 2004-08-04 09:04:05 UTC
Clicking on menu border should simply keep the menu visible.
Comment 1 Tommi Komulainen 2004-08-04 09:06:13 UTC
Created attachment 30195 [details]
Menu with exaggerated borders for testing.
Comment 2 Tommi Komulainen 2004-08-09 12:26:05 UTC
Created attachment 30365 [details] [review]
Proposed fix

Here's an attempt to prevent menu deactivation when button release event occurs
inside the menu shell but outside any menu item.
Comment 3 Tommi Komulainen 2004-08-11 14:05:26 UTC
Bug 61843 has discussion about extending the border area to activate the
menuitems instead, to make gnome-panel menu items an easy target.  (The menu is
next to screen border.)

However, I don't think that behavior makes as much sense for application or
context menus, because those menus are generally away from the screen border. 
In this case making the border area inactive seems more appropriate to me.
Comment 4 Soren Sandmann Pedersen 2004-08-11 23:23:21 UTC
I wouldn't mind a 'make border inactive' patch going in until bug 61843 can be
fixed, but such a patch would have to preserve the 'hold mouse down for .5
seconds' behavior. It doesn't look like this one does.
Comment 5 Tommi Komulainen 2004-08-12 09:19:23 UTC
No, and it would seem the patch fails miserably with context menus.
Comment 6 Soren Sandmann Pedersen 2004-08-12 14:13:32 UTC
Bug 147497 is another related bug. The problem there is that menus will just
stay up if you drag select and release within MENU_SHELL_TIMEOUT seconds.

If we ignore bug 61843 for now, the behavior should be something like:

- button down; mouse NOT moving out of the gtk-drag-threshold area; button up:
       if this sequence happens within .5 seconds, leave the menu up. 
       if mouse up happens more than .5 seconds later, dismiss the menu.

- button down, move out of gtk-drag-threshold area, button up:
       if above a selectable menu item, select it
       if above a border or unselectable menu item, leave menu up
       if above something else (get_event_widget() == NULL)
           if more than k pixels away from mouse-down point
               remove menu
           else
               leave menu up
           where k is on the order of 50 pixels

- when the menu has been left up after a button release, clicks on a border
  or unselectable item should not dismiss the menu. Clicks outside the menu
  should dismiss. Clicks on a selectable item should select it.

Of course this needs to be tried out. I could very well have missed something,
especially wrt. combo menus where the pointer starts inside a menu item.
Comment 7 Shaun McCance 2009-10-09 02:32:59 UTC
Is this bug #423761?
Comment 8 Matthias Clasen 2018-02-10 03:39:35 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.