]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: Don't mark as tablet if device has relative coordinates
authorJoshua Goins <josh@redstrate.com>
Sat, 4 Mar 2023 03:02:02 +0000 (22:02 -0500)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 Mar 2023 00:42:11 +0000 (09:42 +0900)
Tablets don't typically have relative coordinates (they are separated on
the kernel device layer). However, some Logitech mice report similar
supported events, so use the existence of EV_REL to determiner whether or
not the device is really a tablet.

Fixes bug introduced by 0855ce67726f87a5a67b4fb536d58e0e4428a248.

Fixes: #26600
src/udev/udev-builtin-input_id.c

index ef656e0504afbab2a2cca52098850921c1a82634..540f39053038491b4bd9cfb8ea7c445b241599cd 100644 (file)
@@ -258,7 +258,7 @@ static bool test_pointers(sd_device *dev,
         if (is_tablet && has_pad_buttons)
                 is_tablet_pad = true;
 
-        if (has_pad_buttons && has_wheel) {
+        if (has_pad_buttons && has_wheel && !has_rel_coordinates) {
                 is_tablet = true;
                 is_tablet_pad = true;
         }