summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-01-25 16:03:34 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-01-26 16:07:10 +1000
commit224a28de25fda654040a9fd4e5c4d748c9e29809 (patch)
treebace6238e2c90082b6e66e9d9224623d98e4efc8 /src
parentbc2f01ab838119a962f5e5eabb36e33d4c084f2c (diff)
Only force REL_X/Y if no ABS_X/Y exists
5c5b2c8db851df7921cedd888222a6630a007fd8 added forced x/y axes if a device has any axes of the same mode. This was too broad a brush, some devices have a relative wheel but absolute x/y axes and would now get misdetected as purely relative device. Only force relative axes if a device no rel x/y _and_ no abs x/y. Reproducible: virtual machine with QEMU USB Tablet will stop working Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 32fe38b..d540b87 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2146,7 +2146,8 @@ EvdevProbe(InputInfoPtr pInfo)
if (EvdevBitIsSet(pEvdev->rel_bitmask, REL_X) &&
EvdevBitIsSet(pEvdev->rel_bitmask, REL_Y)) {
xf86IDrvMsg(pInfo, X_PROBED, "Found x and y relative axes\n");
- } else
+ } else if (!EvdevBitIsSet(pEvdev->abs_bitmask, ABS_X) ||
+ !EvdevBitIsSet(pEvdev->abs_bitmask, ABS_Y))
EvdevForceXY(pInfo, Relative);
} else {
xf86IDrvMsg(pInfo, X_INFO, "Relative axes present but ignored.\n");