diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-05-24 09:52:17 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-05-30 09:42:06 +1000 |
commit | 9b1b87cadd55016fd3d3560071ebcc9865c3419d (patch) | |
tree | 0341268e47be1e86a32bf24fe0116da3654a536c /udev | |
parent | d3bb8b33744fee39e9de9a95fbff46ce9bc571e7 (diff) |
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'udev')
-rw-r--r-- | udev/90-libinput-model-quirks.hwdb | 4 | ||||
-rwxr-xr-x | udev/parse_hwdb.py | 1 |
2 files changed, 5 insertions, 0 deletions
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] |