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 147497 - Button release should select menu item immediately
Button release should select menu item immediately
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.4.x
Other Linux
: Normal normal
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-07-13 15:53 UTC by Mikael Magnusson
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mikael Magnusson 2004-07-13 15:53:23 UTC
MENU_SHELL_TIMEOUT is defined to 500 (milliseconds) in gtkmenushell.c and refers
to the time you have to keep the mouse button pressed for it to disappear when
you release it. If you release it before that, nothing happens, even if you are
on a menu entry. This is very annoying when you aren't a senior citizen and can
actually find the entry you want within half a second and click it because the
menu stays up and nothing happens and you have to click it again.
It also makes no sense to use it if the menu wasn't actually popped up by the
mouse, ie if you press the Menu key to pop up the context menu and click on it,
nothing happens if you do within 0.5 seconds.
I don't think it should be considered bloat to make the delay configurable given
there are already three or four such variables in .gtkrc-2.0:

gtk-menu-bar-popup-delay
gtk-menu-popup-delay
gtk-menu-popdown-delay
Comment 1 Soren Sandmann Pedersen 2004-07-15 13:16:09 UTC
MENU_SHELL_TIMEOUT is the time after which a menu will pop down if you release
the button. It's useful if just want to see what a menu contains without
selecting anything. 

The bug is that menu items don't get selected click, then click again. I don't
see any reason to make MENU_SHELL_TIMEOUT configurable. In fact this bug was
fixed in 2.4.something, but reverted because it caused other problems. I'll try
and get a better fix for 2.6.0.
Comment 2 Soren Sandmann Pedersen 2004-08-12 13:47:24 UTC
The bug is that when you drag select on a context or option menu, you have to
wait MENU_SHELL_TIMEOUT seconds before releasing, or the menu will just stay up.
Comment 3 Soren Sandmann Pedersen 2004-12-22 16:51:57 UTC
Wed Dec 22 11:35:41 2004  Søren Sandmann  <sandmann@redhat.com>

	Bug #147497, make menu items activate immediately when you release
	the button.
	
	* gtk/gtkmenu.c (gtk_menu_enter_notify, menu_motion_notify): Make
	items activate immediately.

	* gtk/gtkmenu.c (definitely_within_item): New function
	* gtk/gtkmenu.c (check_threshold): New function