[PATCH libinput] evdev: add a quirk for the HP Zbook Studio G3

Peter Hutterer peter.hutterer at who-t.net
Sat Nov 19 23:41:24 UTC 2016


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 <peter.hutterer at who-t.net>
---
 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 fac8fcb..6a34e37 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2179,6 +2179,7 @@ evdev_read_model_flags(struct evdev_device *device)
 		MODEL(APPLE_MAGICMOUSE),
 		MODEL(HP8510_TOUCHPAD),
 		MODEL(HP6910_TOUCHPAD),
+		MODEL(HP_ZBOOK_STUDIO_G3),
 #undef MODEL
 		{ "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL },
 		{ NULL, EVDEV_MODEL_DEFAULT },
@@ -2762,6 +2763,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_ZBOOK_STUDIO_G3)
+		libevdev_set_abs_maximum(device->evdev, ABS_MT_SLOT, 1);
 }
 
 struct evdev_device *
diff --git a/src/evdev.h b/src/evdev.h
index b811f51..888cc28 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -121,6 +121,7 @@ enum evdev_device_model {
 	EVDEV_MODEL_APPLE_MAGICMOUSE = (1 << 20),
 	EVDEV_MODEL_HP8510_TOUCHPAD = (1 << 21),
 	EVDEV_MODEL_HP6910_TOUCHPAD = (1 << 22),
+	EVDEV_MODEL_HP_ZBOOK_STUDIO_G3 = (1 << 23),
 };
 
 struct mt_slot {
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index 4bfc0f9..347a229 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -103,6 +103,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_ZBOOK_STUDIO_G3=1
+
 ##########################################
 # LENOVO
 ##########################################
-- 
2.9.3



More information about the wayland-devel mailing list