From 977588d24a6bc511454c7bd616e8b24a8bc3f58e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Aug 2014 11:56:03 +1000 Subject: 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 --- src/evdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3