diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2014-08-14 11:56:03 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-08-18 10:02:00 +1000 |
commit | 977588d24a6bc511454c7bd616e8b24a8bc3f58e (patch) | |
tree | bbf8ef176d26dd4f7665e7ee88b605352d551861 | |
parent | 291b60172d25446d2cabe61ed93e56db6570baa3 (diff) | |
download | xorg-driver-xf86-input-evdev-977588d24a6bc511454c7bd616e8b24a8bc3f58e.tar.gz |
If only IgnoreRelativeAxes is set, init like a normal relative device
In the current code, if only IgnoreRelativeAxes is set, the code would go on
and force absolute axes to initialize even if the relative axes were
successfully initialized.
Evdev gives precedence to relative axes anyway, initializing absolute axes if
the relative axes failed. Thus, if we explicitely want relative axes but leave
the abs axes as-is, proceed as normal.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/evdev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c index 958d4f9..1a8b8eb 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1921,7 +1921,9 @@ EvdevInit(DeviceIntPtr device) * used and relative axes are ignored. */ - if (pEvdev->flags & (EVDEV_UNIGNORE_RELATIVE | EVDEV_UNIGNORE_ABSOLUTE)) + if ((pEvdev->flags & (EVDEV_UNIGNORE_RELATIVE|EVDEV_UNIGNORE_ABSOLUTE)) == EVDEV_UNIGNORE_RELATIVE) + EvdevInitRelValuators(device, pEvdev); + else if (pEvdev->flags & EVDEV_UNIGNORE_ABSOLUTE) EvdevInitAnyValuators(device, pEvdev); else if (pEvdev->flags & (EVDEV_TOUCHPAD | EVDEV_TOUCHSCREEN | EVDEV_TABLET)) EvdevInitTouchDevice(device, pEvdev); |