VMWare fusion host + vmmouse driver generates drag events on any click
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xserver-xorg-input-vmmouse (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: xserver-
I'm noticing an issue using VMWare 2.0.2 as a host and Jaunty as a guest that vmmouse likes to generate drag events overzealously. This is apparent when:
(1) Clicking in a text field with the left mouse button sometimes highlights a single character. This is extremely apparent in a gnome-terminal, when clicking in a blank past-newline area selects the rest of the line. Even if I raise my optical mouse off the table to the point where I doubt the mouse itself is sending motion events.
(2) If I right click to bring up a context menu, often times it will select the first item for me instantly.
Investigating with xev, when doing a single still mouseclick I see an event like
---
ButtonPress event, serial 30, synthetic NO, window 0x3000001,
root 0xfc, subw 0x0, time 283641182, (79,109), root:(84,175),
state 0x0, button 1, same_screen YES
MotionNotify event, serial 30, synthetic NO, window 0x3000001,
root 0xfc, subw 0x0, time 283641766, (79,109), root:(84,175),
state 0x100, is_hint 0, same_screen YES
ButtonRelease event, serial 30, synthetic NO, window 0x3000001,
root 0xfc, subw 0x0, time 283641766, (79,109), root:(84,175),
state 0x100, button 1, same_screen YES
---
The MotionNotify event is unusual; I don't see that with a physical mouse or a non-vmmouse mouse, it seems to notify a motion to the same spot.
This seems to cause many UI toolkits to mis-interpret what happens as a miniscule drag.
To work around this issue, I played around with a quick hack in vmmouse.c to disallow a buttonpress event from triggering a motion event too, i.e. src/vmmouse.c line 495:
---
if ((dx || dy) && (truebuttons == pMse->lastButtons))
---
This SIGNIFICANTLY helps the case with a standstill mouse, but I STILL the slightest motion of the mouse while clicking will trigger a small MotionNotify event and cause the same behavior. I find this to be an unrealistic emulation of a mouse -- with no physical Linux system and mouse combination have I had to work so hard at keeping the mouse still while clicking.
It might be a good idea to guard against miniscule motion events while dragging.
I updated the host to VMWare Fusion Version 2.0.4 (159196), same behavior observed. Interestingly it doesn't seem to happen in VMWare Workstation 6.5.2 on Linux?