udev: only change the fuzz on touchpads and touchscreens (v2)
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 26 Jun 2019 01:31:56 +0000 (11:31 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 26 Jun 2019 02:21:33 +0000 (12:21 +1000)
If we don't handle a device, don't touch it. Especially joysticks that we
don't handle and thus should not touch either.

Related to !231

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
udev/90-libinput-fuzz-override.rules.in

index 84ad26b..e3d8e53 100644 (file)
@@ -6,7 +6,15 @@
 ACTION!="add|change", GOTO="libinput_fuzz_override_end"
 KERNEL!="event*", GOTO="libinput_fuzz_override_end"
 
-ATTRS{capabilities/abs}!="0", IMPORT{program}="@UDEV_TEST_PATH@libinput-fuzz-override %S%p"
-
-LABEL="libinput_model_quirks_end"
+# libinput-fuzz-override must only be called once per device, otherwise
+# we'll lose the fuzz information
+ATTRS{capabilities/abs}!="0", \
+       ENV{ID_INPUT_TOUCHPAD}=="1", \
+       IMPORT{program}="@UDEV_TEST_PATH@libinput-fuzz-override %S%p", \
+       GOTO="libinput_fuzz_override_end"
+ATTRS{capabilities/abs}!="0", \
+       ENV{ID_INPUT_TOUCHSCREEN}=="1", \
+       IMPORT{program}="@UDEV_TEST_PATH@libinput-fuzz-override %S%p", \
+       GOTO="libinput_fuzz_override_end"
 
+LABEL="libinput_fuzz_override_end"