From 9b1b87cadd55016fd3d3560071ebcc9865c3419d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 May 2018 09:52:17 +1000 Subject: touchpad: replace the hardcoded thumb threshold with a udev prop LIBINPUT_ATTR_THUMB_PRESSURE_THRESHOLD now determines whether we do thumb pressure detection or not. Much better than having a hardcoded default that may or may not be correct on any given device. This patch is likely to break thumb detection on some touchpads, the only property so far is to restore the default of 100 for all Lenovo Thinkpad touchpads. More rules are needed, we'll just wait until someone shouts. https://bugs.freedesktop.org/show_bug.cgi?id=106458 Signed-off-by: Peter Hutterer --- udev/90-libinput-model-quirks.hwdb | 4 ++++ udev/parse_hwdb.py | 1 + 2 files changed, 5 insertions(+) (limited to 'udev') diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 06e48950..6b3ca196 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -254,6 +254,10 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX1Carbon3rd LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD=1 LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=150 +# Lenovo ThinkPad series +libinput:name:*Synaptics*:dmi:*svnLENOVO:*:pvrThinkPad*:* + LIBINPUT_ATTR_THUMB_PRESSURE_THRESHOLD=100 + # Lenovo ThinkPad Compact USB Keyboard with TrackPoint libinput:keyboard:input:b0003v17EFp6047* LIBINPUT_ATTR_KEYBOARD_INTEGRATION=external diff --git a/udev/parse_hwdb.py b/udev/parse_hwdb.py index 3f47f338..d00bce4c 100755 --- a/udev/parse_hwdb.py +++ b/udev/parse_hwdb.py @@ -114,6 +114,7 @@ def property_grammar(): Or(('reliable', 'write_open'))), ('LIBINPUT_ATTR_KEYBOARD_INTEGRATION', Or(('internal', 'external'))), ('LIBINPUT_ATTR_TRACKPOINT_RANGE', INTEGER('Y')), + ('LIBINPUT_ATTR_THUMB_PRESSURE_THRESHOLD', INTEGER('Y')), ) value_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE') for name, val in vprops] -- cgit v1.2.3