mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user