diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-07-14 10:27:46 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-07-27 19:34:42 +1000 |
commit | eb146677eb5abb7951af4ead80874c992915b90d (patch) | |
tree | 536a96cbae712e899807d218fc927cbee8ff1fa7 /udev | |
parent | 316f30d2f28b62f90efc2bdd9e6f3d83116070e7 (diff) |
touchpad: disable 2fg scrolling on Synaptics semi-mt touchpads
These touchpads have a terrible resolution when two fingers are down, causing
scrolling to jump around a lot. That then turns into bug reports that we can't
do much about, the data is simply garbage.
https://bugs.freedesktop.org/show_bug.cgi?id=91135
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'udev')
-rw-r--r-- | udev/libinput-model-quirks.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/udev/libinput-model-quirks.c b/udev/libinput-model-quirks.c index fc3dbe85..0e737a4b 100644 --- a/udev/libinput-model-quirks.c +++ b/udev/libinput-model-quirks.c @@ -69,6 +69,30 @@ handle_touchpad_alps(struct udev_device *device) } static void +handle_touchpad_synaptics(struct udev_device *device) +{ + const char *product, *props; + int bus, vid, pid, version; + int prop; + + product = prop_value(device, "PRODUCT"); + if (!product) + return; + + if (sscanf(product, "%x/%x/%x/%x", &bus, &vid, &pid, &version) != 4) + return; + + if (bus != BUS_I8042 || vid != 0x2 || pid != 0x7) + return; + + props = prop_value(device, "PROP"); + if (sscanf(props, "%x", &prop) != 1) + return; + if (prop & (1 << INPUT_PROP_SEMI_MT)) + printf("LIBINPUT_MODEL_JUMPING_SEMI_MT=1\n"); +} + +static void handle_touchpad(struct udev_device *device) { const char *name = NULL; @@ -79,6 +103,8 @@ handle_touchpad(struct udev_device *device) if (strstr(name, "AlpsPS/2 ALPS") != NULL) handle_touchpad_alps(device); + if (strstr(name, "Synaptics ") != NULL) + handle_touchpad_synaptics(device); } int main(int argc, char **argv) |