diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-11-02 09:40:42 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-12-01 06:24:07 +1000 |
commit | 996b845d68cfa23b7f8a8f9da1bbc40527da562b (patch) | |
tree | 675f8df88cfc4d5b6225ab72182adb49083b486e /src | |
parent | 4bb3da411554c01f99d298142a2c076f2e96778f (diff) |
touchpad: add a quirk for the HP Pavilion dm4
This touchpad has cursor jumps for 2-finger scrolling that also affects the
single-finger emulation. So disable any multitouch bits on this device and
disallow the 2-finger scroll method. This still allows for 2-finger
tapping/clicking.
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 'src')
-rw-r--r-- | src/evdev-mt-touchpad.c | 12 | ||||
-rw-r--r-- | src/evdev.c | 1 | ||||
-rw-r--r-- | src/evdev.h | 1 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 0492851..0a261a3 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1770,8 +1770,12 @@ tp_init_slots(struct tp_dispatch *tp, * If three fingers are set down in the same frame, one slot has the * coordinates 0/0 and may not get updated for several frames. * See https://bugzilla.redhat.com/show_bug.cgi?id=1295073 + * + * The HP Pavilion DM4 touchpad has random jumps in slots, including + * for single-finger movement. See fdo bug 91135 */ - if (tp->semi_mt) { + if (tp->semi_mt || + device->model_flags & EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD) { tp->num_slots = 1; tp->slot = 0; tp->has_mt = false; @@ -1874,6 +1878,12 @@ tp_scroll_get_methods(struct tp_dispatch *tp) { uint32_t methods = LIBINPUT_CONFIG_SCROLL_EDGE; + /* Any movement with more than one finger has random cursor + * jumps. Don't allow for 2fg scrolling on this device, see + * fdo bug 91135 */ + if (tp->device->model_flags & EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD) + return LIBINPUT_CONFIG_SCROLL_EDGE; + if (tp->ntouches >= 2) methods |= LIBINPUT_CONFIG_SCROLL_2FG; diff --git a/src/evdev.c b/src/evdev.c index afb5e34..57670e2 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2186,6 +2186,7 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(HP8510_TOUCHPAD), MODEL(HP6910_TOUCHPAD), MODEL(HP_ZBOOK_STUDIO_G3), + MODEL(HP_PAVILION_DM4_TOUCHPAD), #undef MODEL { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL }, { NULL, EVDEV_MODEL_DEFAULT }, diff --git a/src/evdev.h b/src/evdev.h index b5a54a2..071b9ec 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -122,6 +122,7 @@ enum evdev_device_model { EVDEV_MODEL_HP8510_TOUCHPAD = (1 << 21), EVDEV_MODEL_HP6910_TOUCHPAD = (1 << 22), EVDEV_MODEL_HP_ZBOOK_STUDIO_G3 = (1 << 23), + EVDEV_MODEL_HP_PAVILION_DM4_TOUCHPAD = (1 << 24), }; struct mt_slot { |