GNOME Bugzilla – Bug 564520
When using Vino, short right-click in gnome-terminal opens new terminal window
Last modified: 2011-04-18 17:03:52 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.
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 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.