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 672802 - Context menus: item is selected after right-clicking - accidentally clicking the selected menu item
Context menus: item is selected after right-clicking - accidentally clicking ...
Status: RESOLVED DUPLICATE of bug 673906
Product: gtk+
Classification: Platform
Component: .General
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-03-25 13:10 UTC by Volker Sobek (weld)
Modified: 2012-04-11 13:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Volker Sobek (weld) 2012-03-25 13:10:57 UTC
When doing a right-click to get the context menu, the first menu entry is selected, which leads to accidentally 'clicking' this menu entry when doing a 'slow' right-click. Notice that this happens even if you don't move the pointer at all between click and release.

On the contrary, pressing the menu key does not select any menu item (you have to press up/down or move the pointer to select one at all). Right-click should do the same.

gtk3-3.3.20-1.fc17.x86_64
Comment 1 Volker Sobek (weld) 2012-03-25 13:35:14 UTC
Seems like a regression, gtk2 does it right.
Comment 2 Volker Sobek (weld) 2012-03-25 13:59:11 UTC
The aforementioned behavior can be seen with context menus in nautilus.

Now I found out that right-clicking and pressing the menu key behave contrary in gnome-terminal:

right-click -> no context-menu item is selected
menu key -> first context-menu item is selected
Comment 3 Matthias Clasen 2012-03-31 00:57:56 UTC
I don't see any evidence that gtk's behaviour has changed here.
If you use gtk3-demo, you'll see that context menus also behave as expected here (keynav selects the first item if it is sensitive, button press doesn't)
Do you have any other examples where this goes wrong, apart from nautilus ?
Comment 4 Volker Sobek (weld) 2012-03-31 06:42:03 UTC
(In reply to comment #3)
> Do you have any other examples where this goes wrong, apart from nautilus ?
Yes: Rhythmbox, totem (video area) and evolution.

I noticed something interesting: When I start totem directly (not opening a file) and right-click on the video-area, no menu item is selected, but as soon as something is playing any right-click shows a selected item.

Similarly, in rhythmbox, when I start it and right-click on any song in the list, without left-clicking it first no menu item is selected. After that first click though, all subsequent ones show a selected menu item.
Comment 5 Volker Sobek (weld) 2012-03-31 07:02:09 UTC
(In reply to comment #4)

> Similarly, in rhythmbox, when I start it and right-click on any song in the
> list, without left-clicking it first no menu item is selected.
And if I move the pointer (around) over the first menu item in this case, it gets not selected (not blue). I first have to move the pointer over the second menu item (which turns blue correctly) and then back to the first, in order to get the first menu item blue.
Comment 6 Volker Sobek (weld) 2012-03-31 07:15:50 UTC
> I noticed something interesting: When I start totem directly (not opening a
> file) and right-click on the video-area, no menu item is selected, but as soon
> as something is playing any right-click shows a selected item.
Oh well, this isn't interesting, as the first item CAN'T be selected as it's not active when no file is loaded.
Comment 7 Volker Sobek (weld) 2012-03-31 14:05:26 UTC
I found a way to reproduce the bug in gtk3-widget-factory with gtk3-3.4.0-1.fc17.x86_64:

Run gtk3-widget-factory and click somewhere in the comboboxentry field (with the content 'comboboxentry'). Mark some part of the text and do a right-click and notice that the menu shows up correctly with no menu item being selected. DON'T click any menu item now but discard the right-click menu. Click in the widget with text now (Lorem ipsum dolor sit amet...) or/and the entry widget, select some text and right-click. Again no menu item selected. So far everything works as it should and keeps doing so if you keep DISCARDING the right-click menus.

But as soon as you CLICK on a menu entry (no matter in which widget), the right-click menu will have the first item selected, provided it is clickable/active (you may need to have a selection) in ALL mentioned context menus of the mentioned widgets (comboboxentry, entry, Lorem ipsum dolor...).
Comment 8 Volker Sobek (weld) 2012-03-31 14:14:08 UTC
s/But as soon as you CLICK on a menu entry/But as soon as you CLICK on the 'cut' menu entry/
Comment 9 Volker Sobek (weld) 2012-03-31 14:16:47 UTC
Actually, clicking 'cut' or 'copy' in a right-click menu causes the following right-click menus to have the first item selected.
Comment 10 Volker Sobek (weld) 2012-04-11 13:36:15 UTC
Filed a new bug with less garbage info.

*** This bug has been marked as a duplicate of bug 673906 ***