Revert "evdev: fix the check for tablet vs joystick"
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 12 Aug 2020 23:40:03 +0000 (09:40 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 13 Aug 2020 01:02:25 +0000 (11:02 +1000)
There are a number of devices that have the ID_INPUT_JOYSTICK tag set by udev,
usually because of seemingly random event codes set. We cannot rely on
ID_INPUT_JOYSTICK to be accurate enough.

Fixes #517

This reverts commit eededbeb7faa2b6182c02a84884f54c1cb1d8a2a.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev.c

index 0d8e87665826643867b3894a952823a885b525d2..124b07a012cd82e1e37d33f5fbbd1626875af803 100644 (file)
@@ -1810,8 +1810,11 @@ evdev_configure_device(struct evdev_device *device)
                evdev_disable_accelerometer_axes(device);
        }
 
-       if (udev_tags & EVDEV_UDEV_TAG_JOYSTICK) {
-               evdev_log_info(device, "device is a joystick, ignoring\n");
+       /* libwacom *adds* TABLET, TOUCHPAD but leaves JOYSTICK in place, so
+          make sure we only ignore real joystick devices */
+       if (udev_tags == (EVDEV_UDEV_TAG_INPUT|EVDEV_UDEV_TAG_JOYSTICK)) {
+               evdev_log_info(device,
+                              "device is a joystick, ignoring\n");
                return NULL;
        }