Only force REL_X/Y if no ABS_X/Y exists

5c5b2c8db8 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>
This commit is contained in:
Peter Hutterer
2012-01-25 16:03:34 +10:00
parent bc2f01ab83
commit 224a28de25

View File

@@ -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");