I finally got around to testing the VMware virtual absolute usb mouse with the latest version of evdev, and unfortunately it doesn't work again. The reason is that evdev is assuming that if a device provides the X or Y axes, it will be a tablet with the ABSOLUTE_TOUCH button and that motion events should only be acknowledged if the touch 'button' is pressed. Frustratingly, evdev already has code to notice that the touch button is absent but it doesn't check when receiving motion events. I'm attaching a patch so that the motion event code checks for the flag that is set when the button is detected. With this patch, the VMware mouse works correctly.
Created attachment 13647 [details] [review] Patch to handle absolute devices without a TOUCH button I can check this in once its approved.
This patch is wrong. Why is EV_ABS_V_USE_TOUCH getting set on the device at all?
See EvdevParseAbsOptions: If the "use_touch" option is set for the axis, then EV_ABS_V_USE_TOUCH will be set for that axis. Then in EvdevAxisAbsNew, if the axis is ABS_X or ABS_Y, the "use_touch" option is set. Then in EvdevAxisAbsNew1, it checks for the AbsoluteTouch button and if it is present, it sets (state->abs->flags |= EV_ABS_USE_TOUCH) So, within that context, I added the addition check for EV_ABS_USE_TOUCH. Of course, if you think all the stuff is bogus, the fix will look different.
any comments?
Checked in a fix that clears the EV_ABS_V_USE_TOUCH for the X and Y axes if the device does not have a touch button. Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.