[regression] With slow mice, opening a right-click context menu immediately executes the first entry
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gtk+2.0 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Repro steps:
1. Connect a mouse whose button press/release events arrive slowly.
2. Open any gtk app. (For example, gedit or gcalctool.)
3. Right-click somewhere to open a context menu whose first item is selectable. (For example, in gedit just type something and then right-click on the text area--the first item will be Undo and will be selectable. In gcalctool, type in a number, highlight it, and then right-click on the number--the first item will be Cut and will be selectable.)
What I expect to happen:
A context menu should appear and wait for the user to make a selection.
What happens instead:
A context menu appears and disappears and the app immediately executes the first entry without any further clicks. The user doesn't even have enough time to see what has happened. Obviously this is disorientating and annoying.
This is a regression--it used to work fine. I think it started after the update to Maverick.
I believe the problem only occurs with mice that have a large delay between the button press event and the button release event. The built-in trackpad and buttons in my laptop do NOT trigger the problem, but my external mouse does. (The external mouse came with my Wacom Bamboo CTE-450 tablet.) From looking at the timestamps in the "xev" tool, it appears that the external mouse has a much longer delay between the two events than the internal mouse (xev output is attached).
The problem can be avoided in two ways, but neither is convenient:
1) By holding down the right mouse button, moving the mouse over the desired context menu entry, and then releasing the right mouse button.
2) By moving the mouse left and/or up while clicking, so that the mouse button is released quickly but at a different location on screen that is not over the context menu.
Note that slowly moving the mouse to another area of the screen and releasing does NOT work because gtk dismisses the context menu if the button was held down for a certain amount of time before releasing.
The problem only occurs in native gtk apps. Other apps such as Firefox and OpenOffice are not affected.
To solve the problem, I recommend the following:
1) Create the context menu down-and-right of the mouse pointer, so that the mouse pointer is not over the first item when the right mouse button is released.
AND
2) Increase the delay before treating a button release as a distinct event.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: libgtk2.0-0 2.22.0-0ubuntu1
ProcVersionSign
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Thu Nov 25 12:04:25 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: gtk+2.0
Changed in gtk+2.0 (Ubuntu): | |
status: | New → Confirmed |
Not sure it's gtk-related.
Also happens on my desktop PC with Ubuntu 10.10
( Linux dmi 2.6.35-27-generic #48-Ubuntu SMP Tue Feb 22 20:25:46 UTC 2011 x86_64 GNU/Linux )
in both gtk and kde/qt applications. Namely it's eclipse, gedit and konsole.
I've got A4tech X7 X-750F mouse connected via USB.
Right-click triggers double-right-click in about 70-80% of clicks.
Just connected my mouse via USB to PS/2 connector, and the bug is gone.
Attaching xev output with both USB and PS/2 logs.