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 505638 - GTK+ needs extra click to show two consecutive menus
GTK+ needs extra click to show two consecutive menus
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.12.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 347633 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-12-26 00:08 UTC by Nelson Benitez
Modified: 2012-02-27 00:34 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Nelson Benitez 2007-12-26 00:08:14 UTC
Please describe the problem:
Hi,
GTK+ toolkit lacks a very important feature in the menu system that, I hate to say it, both KDE and WinXP has. That is, to show two context menus with two mouseclicks, GTK+ needs 3 mouseclicks to show 2 context menus, so GTK+ makes you always do an extra click, which I think makes the use of the desktop to be less dynamic and slower.




Steps to reproduce:

Check it in nautilus:
0. Open a folder in nautilus.
1. Move the mouse pointer over a file icon.
2. Press right mouse button -> the context menu for that file is shown.
3. Move the mouse pointer over another file icon
4. Press right mouse button
4. Press right mouse button

Actual results:
The context menu shown in step 2 disappears

Expected results:
The context menu shown in step 2 disappears AND the context menu for the file I'm clicking appears. 

Does this happen every time?
yes

Other information:
You can see this bug not only in nautilus but on any app that uses gtk+, for example in the context menus of gnome-panel,file-roller or in firefox, where you will need an extra click to display the context menu of two hyperlinks.
Comment 1 Nelson Benitez 2007-12-26 00:21:16 UTC
I tried to fix this bug but for me this is impossible with the current design of gtk context menus where you take an X grab when a menu is displayed. 

It could be useful to look at the implementation of context menus in QT because they don't have this limitation. 

The function that shows a context menu is gtk_menu_popup()[1].

The code that hides a shown context menu when you click anywhere is in gtk/gtkmenushell.c about line 755 when it calls gtk_menu_shell_deactivate() which in turn calls gtk_menu_popdown() where the menu is cleared.



[1] http://library.gnome.org/devel/gtk/unstable/GtkMenu.html#gtk-menu-popup
Comment 2 Nelson Benitez 2007-12-26 12:28:25 UTC
*** Bug 347633 has been marked as a duplicate of this bug. ***
Comment 3 Matthias Clasen 2007-12-29 23:56:41 UTC
I disagree that this is a "very important feature", and as just noticed, it is just about impossible to do in the GTK+ menu system.

I'm going to go ahead and close this WONTFIX, since it is not really useful to keep bugs open that depend on a rewrite of the whole menu system.
Comment 4 Nelson Benitez 2008-01-08 19:00:17 UTC
The Qt docs about menu is http://doc.trolltech.com/4.0/qmenu.html#details

I dont share opinion of this bug being closed as wontfix because depends on a rewrite, it's not bug's fault that depends on a rewrite, the bug is still there... maybe someone would like to work on this, maybe this could be rewrite when a future topaz breakage exists...
Comment 5 Cody Russell 2008-01-08 20:35:50 UTC
This seems to me more like something that gtk+ just does differently than others.  Like the fact that you can open a menu with a right-click or the fact that hitting the "alt" key alone doesn't activate the menubar.  Is it really that annoying of an issue to have to click a second time?