GNOME Bugzilla – Bug 505638
GTK+ needs extra click to show two consecutive menus
Last modified: 2012-02-27 00:34:09 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.
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
*** Bug 347633 has been marked as a duplicate of this bug. ***
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.
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...
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?