From e72e6eb72b0b949969f7e33aac91b447c75f6b03 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 12 Apr 2016 11:07:02 +1000 Subject: [PATCH libinput] touchpad: add LIBINPUT_MODEL_WOBBLY_TOUCHPAD for the HP 14-ac157tu If some elantech touchpads require a hysteresis, let's use some more generic tag for those touchpads that require correct handling of pointer wobbles. https://bugs.freedesktop.org/show_bug.cgi?id=94897 Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 3 +++ src/evdev.c | 1 + src/evdev.h | 1 + udev/90-libinput-model-quirks.hwdb | 8 ++++++++ 4 files changed, 13 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 0640974..a6eebd2 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2023,6 +2023,9 @@ tp_init_hysteresis(struct tp_dispatch *tp) (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD)) goto want_hysteresis; + if (tp->device->model_flags & EVDEV_MODEL_WOBBLY_TOUCHPAD) + goto want_hysteresis; + tp->hysteresis_margin.x = 0; tp->hysteresis_margin.y = 0; diff --git a/src/evdev.c b/src/evdev.c index 6bb8986..f0311c6 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1681,6 +1681,7 @@ evdev_read_model_flags(struct evdev_device *device) { "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA }, { "LIBINPUT_MODEL_ALPS_RUSHMORE", EVDEV_MODEL_ALPS_RUSHMORE }, { "LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD", EVDEV_MODEL_LENOVO_T450_TOUCHPAD }, + { "LIBINPUT_MODEL_WOBBLY_TOUCHPAD", EVDEV_MODEL_WOBBLY_TOUCHPAD }, { NULL, EVDEV_MODEL_DEFAULT }, }; const struct model_map *m = model_map; diff --git a/src/evdev.h b/src/evdev.h index 4a5d807..3a7693e 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -114,6 +114,7 @@ enum evdev_device_model { EVDEV_MODEL_CYAPA = (1 << 15), EVDEV_MODEL_ALPS_RUSHMORE = (1 << 16), EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17), + EVDEV_MODEL_WOBBLY_TOUCHPAD = (1 << 18), }; struct mt_slot { diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index d5978f7..d075417 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -81,6 +81,14 @@ libinput:name:Cypress APA Trackpad (cyapa):dmi:* LIBINPUT_MODEL_CYAPA=1 ########################################## +# HP +########################################## + +# HP 14-ac157tu +libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnHP*pvrCNB1:* + LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1 + +########################################## # LENOVO ########################################## -- 2.5.5