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 564520 - When using Vino, short right-click in gnome-terminal opens new terminal window
When using Vino, short right-click in gnome-terminal opens new terminal window
Status: RESOLVED FIXED
Product: vino
Classification: Applications
Component: Server
2.24.x
Other All
: Normal normal
: ---
Assigned To: Vino Maintainer(s)
Vino Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-12-14 20:24 UTC by Oliver Gerlich
Modified: 2011-04-18 17:03 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Possible fix: don't send MotionNotify when clicking and mouse didn't move (1.35 KB, patch)
2008-12-14 20:33 UTC, Oliver Gerlich
committed Details | Review

Description Oliver Gerlich 2008-12-14 20:24:42 UTC
Please describe the problem:
When using Vino and a VNC client (vinagre, krdc, vncviewer...) to control a Gnome desktop, then a right-click into a gnome-terminal window usually opens a new terminal window (because the top entry in the context menu is getting activated).

This reproducibly happens when not moving the mouse at all during the clicking and releasing.

The problem does not happen when doing the same action directly on the same Gnome desktop without using VNC. I suppose it also doesn't happen with every GTK theme (Crux is immune), but it seems to happen with both Clearlooks and Murrine (and the default Ubuntu Intrepid 8.10 theme)

Steps to reproduce:
1. use VNC to connect to a Vino server
2. open a Gnome terminal window
3. move the mouse cursor into the terminal window
4. press and immediately release the right mouse button without moving the mouse (ie. do a normal right-click)


Actual results:
A new terminal window is opened.

Expected results:
The context menu should appear, with the cursor placed in the top left corner of the menu. Basically, it should behave the same as when doing this directly with the physical mouse.

Does this happen every time?
Yes.

Other information:
The problem is probably that Vino always generates a MotionNotify event for every ButtonPress and every ButtonRelease event - this doesn't happen with native mouse. This can be seen when doing a right-click in xev. Also, x11vnc behaves similarly (ie. wrong), while Xvnc behaves correctly as it seems.
Comment 1 Oliver Gerlich 2008-12-14 20:33:24 UTC
Created attachment 124674 [details] [review]
Possible fix: don't send MotionNotify when clicking and mouse didn't move

This patch fixes the problem for me. It only generates a MotionNotify event if the button state didn't change or if the mouse coordinates have actually changed.

(Btw. small correction: looks like this bug does not happen with Clearlooks theme... But with default Intrepid theme it always happens)
Comment 2 David King 2011-04-18 17:03:38 UTC
Comment on attachment 124674 [details] [review]
Possible fix: don't send MotionNotify when clicking and mouse didn't move

Pushed a slightly modifed patch to gnome-3-0 and master as commits 9868907dd858d55bf330faeaede923cb85791db5 and bd13d6bb1c99cbad30001cdf90f7a459d342e06.