diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2019-06-26 13:55:36 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2019-06-26 18:27:36 +1000 |
commit | 82958a31f1dccdf0ffb02d1719912d5d8d43188b (patch) | |
tree | a28729bee6f30b281230338d2b7650b55fe2f671 | |
parent | 82102f8599e1792b331557b9135404750ee0ada7 (diff) | |
download | libinput-82958a31f1dccdf0ffb02d1719912d5d8d43188b.tar.gz |
evdev: only extract the fuzz for touchpads and touchscreens
We don't have a hysteresis for tablet devices, so let's leave those as-is.
This may be a slight regression in behavior compared to pre-410b157e84 now the
kernel will apply the fuzz. Let's see if anyone notices, the fuzz is usually
so tiny on tablets that it shouldn't be noticable.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/evdev.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/evdev.c b/src/evdev.c index 14fce3ff..940a2fdc 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1602,7 +1602,8 @@ evdev_reject_device(struct evdev_device *device) } static void -evdev_extract_abs_axes(struct evdev_device *device) +evdev_extract_abs_axes(struct evdev_device *device, + enum evdev_device_udev_tags udev_tags) { struct libevdev *evdev = device->evdev; int fuzz; @@ -1614,10 +1615,12 @@ evdev_extract_abs_axes(struct evdev_device *device) if (evdev_fix_abs_resolution(device, ABS_X, ABS_Y)) device->abs.is_fake_resolution = true; - if ((fuzz = evdev_read_fuzz_prop(device, ABS_X))) - libevdev_set_abs_fuzz(evdev, ABS_X, fuzz); - if ((fuzz = evdev_read_fuzz_prop(device, ABS_Y))) - libevdev_set_abs_fuzz(evdev, ABS_Y, fuzz); + if (udev_tags & (EVDEV_UDEV_TAG_TOUCHPAD|EVDEV_UDEV_TAG_TOUCHSCREEN)) { + if ((fuzz = evdev_read_fuzz_prop(device, ABS_X))) + libevdev_set_abs_fuzz(evdev, ABS_X, fuzz); + if ((fuzz = evdev_read_fuzz_prop(device, ABS_Y))) + libevdev_set_abs_fuzz(evdev, ABS_Y, fuzz); + } device->abs.absinfo_x = libevdev_get_abs_info(evdev, ABS_X); device->abs.absinfo_y = libevdev_get_abs_info(evdev, ABS_Y); @@ -1722,7 +1725,7 @@ evdev_configure_device(struct evdev_device *device) evdev_fix_android_mt(device); if (libevdev_has_event_code(evdev, EV_ABS, ABS_X)) { - evdev_extract_abs_axes(device); + evdev_extract_abs_axes(device, udev_tags); if (evdev_is_fake_mt_device(device)) udev_tags &= ~EVDEV_UDEV_TAG_TOUCHSCREEN; |