79 lines
3.0 KiB
Diff
79 lines
3.0 KiB
Diff
From 0cd65cf336c8cc242c471ac77aee7b7d816e7314 Mon Sep 17 00:00:00 2001
|
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Date: Thu, 13 Dec 2018 12:06:53 +1000
|
|
Subject: [PATCH libinput] quirks: add a quirk for the Lenovo T480s clickpad
|
|
|
|
It's missing INPUT_PROP_BUTTONPAD but working kernel drivers prove to be
|
|
elusive. Meanwhile, add a quirk here that force-enables this bit.
|
|
|
|
Fixes #177
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
---
|
|
quirks/50-system-lenovo.quirks | 5 +++++
|
|
src/evdev.c | 6 ++++++
|
|
src/quirks.c | 1 +
|
|
src/quirks.h | 1 +
|
|
4 files changed, 13 insertions(+)
|
|
|
|
diff --git a/quirks/50-system-lenovo.quirks b/quirks/50-system-lenovo.quirks
|
|
index 9fe961ad9..c45359e63 100644
|
|
--- a/quirks/50-system-lenovo.quirks
|
|
+++ b/quirks/50-system-lenovo.quirks
|
|
@@ -20,6 +20,11 @@ MatchName=Synaptics tm2964-001
|
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT440p*
|
|
ModelLenovoT450Touchpad=1
|
|
|
|
+[Lenovo T480s Touchpad]
|
|
+MatchName=Elan Touchpad
|
|
+MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480s*
|
|
+ModelLenovoT480sTouchpad=1
|
|
+
|
|
[Lenovo X200 Trackpoint]
|
|
MatchName=*TPPS/2 IBM TrackPoint
|
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX20?:*
|
|
diff --git a/src/evdev.c b/src/evdev.c
|
|
index 4a998f41c..ddd6d110b 100644
|
|
--- a/src/evdev.c
|
|
+++ b/src/evdev.c
|
|
@@ -1908,6 +1908,12 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
|
|
libevdev_enable_property(device->evdev,
|
|
INPUT_PROP_BUTTONPAD);
|
|
|
|
+ /* Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
|
|
+ * https://gitlab.freedesktop.org/libinput/libinput/issues/177 */
|
|
+ if (evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_T480S_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 (evdev_device_has_model_quirk(device, QUIRK_MODEL_HP_ZBOOK_STUDIO_G3))
|
|
diff --git a/src/quirks.c b/src/quirks.c
|
|
index debedfb69..fa12045b6 100644
|
|
--- a/src/quirks.c
|
|
+++ b/src/quirks.c
|
|
@@ -241,6 +241,7 @@ quirk_get_name(enum quirk q)
|
|
case QUIRK_MODEL_HP_ZBOOK_STUDIO_G3: return "ModelHPZBookStudioG3";
|
|
case QUIRK_MODEL_LENOVO_SCROLLPOINT: return "ModelLenovoScrollPoint";
|
|
case QUIRK_MODEL_LENOVO_T450_TOUCHPAD: return "ModelLenovoT450Touchpad";
|
|
+ case QUIRK_MODEL_LENOVO_T480S_TOUCHPAD: return "ModelLenovoT480sTouchpad";
|
|
case QUIRK_MODEL_LENOVO_X230: return "ModelLenovoX230";
|
|
case QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD: return "ModelSynapticsSerialTouchpad";
|
|
case QUIRK_MODEL_SYSTEM76_BONOBO: return "ModelSystem76Bonobo";
|
|
diff --git a/src/quirks.h b/src/quirks.h
|
|
index 735ed56dc..1d731a488 100644
|
|
--- a/src/quirks.h
|
|
+++ b/src/quirks.h
|
|
@@ -73,6 +73,7 @@ enum quirk {
|
|
QUIRK_MODEL_HP_ZBOOK_STUDIO_G3,
|
|
QUIRK_MODEL_LENOVO_SCROLLPOINT,
|
|
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,
|
|
+ QUIRK_MODEL_LENOVO_T480S_TOUCHPAD,
|
|
QUIRK_MODEL_LENOVO_X230,
|
|
QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD,
|
|
QUIRK_MODEL_SYSTEM76_BONOBO,
|
|
--
|
|
2.19.2
|
|
|