From 32a7e9b892c4b4db8231082ddb3bbc4e319f26b8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 13 Oct 2016 19:05:00 +1000 Subject: [PATCH libinput] evdev: add a quirk for the HP Zbook Studio G3 Announces 4 slots but only sends data for the first two. This causes libinput to miss three-finger actions (we don't look at BTN_TOOL_TRIPLETAP if we have 3 or more slots). https://bugs.freedesktop.org/show_bug.cgi?id=98100 Signed-off-by: Peter Hutterer --- src/evdev.c | 6 ++++++ src/evdev.h | 1 + udev/90-libinput-model-quirks.hwdb | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/evdev.c b/src/evdev.c index f7f7230..4cc6f4e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2143,6 +2143,7 @@ evdev_read_model_flags(struct evdev_device *device) MODEL(TRACKBALL), MODEL(APPLE_MAGICMOUSE), MODEL(HP8510_TOUCHPAD), + MODEL(HP_ZENBOOK_STUDIO_G3), #undef MODEL { "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL }, { NULL, EVDEV_MODEL_DEFAULT }, @@ -2724,6 +2725,11 @@ evdev_pre_configure_model_quirks(struct evdev_device *device) if (device->model_flags & EVDEV_MODEL_HP_STREAM11_TOUCHPAD) libevdev_enable_property(device->evdev, INPUT_PROP_BUTTONPAD); + + /* Touchpad claims to have 4 slots but only ever sends 2 + * https://bugs.freedesktop.org/show_bug.cgi?id=98100 */ + if (device->model_flags & EVDEV_MODEL_HP_ZENBOOK_STUDIO_G3) + libevdev_set_abs_maximum(device->evdev, ABS_MT_SLOT, 2); } struct evdev_device * diff --git a/src/evdev.h b/src/evdev.h index 4e28e05..9f3525f 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -120,6 +120,7 @@ enum evdev_device_model { EVDEV_MODEL_TRACKBALL = (1 << 19), EVDEV_MODEL_APPLE_MAGICMOUSE = (1 << 20), EVDEV_MODEL_HP8510_TOUCHPAD = (1 << 21), + EVDEV_MODEL_HP_ZENBOOK_STUDIO_G3 = (1 << 22), }; struct mt_slot { diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index fed28e2..ce076be 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -99,6 +99,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq8510 libinput:name:SYN1EDE:00 06CB:7442:dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11* LIBINPUT_MODEL_HP_STREAM11_TOUCHPAD=1 +# HP Zbook Studio G3 +libinput:name:AlpsPS/2 ALPS GlidePoint:dmi:svnHP:pnHPZBookStudioG3:* + LIBINPUT_MODEL_HP_ZENBOOK_STUDIO_G3=1 + ########################################## # LENOVO ########################################## -- 2.7.4