summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-03-20 15:21:33 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-03-20 15:32:01 +1000
commit4ff5f02d9cfe3f1fc67377f012105de9cf957598 (patch)
tree32af7580cf7ae056b2b7651eea5bec0f1d3adb0a
parent8b6d799510edb849e0c3ab11ebf6cea5d2ed3e9c (diff)
tools: touchpad-pressure: init the lo/hi values correctly
From https://bugs.freedesktop.org/show_bug.cgi?id=105535 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rwxr-xr-xtools/libinput-measure-touchpad-pressure6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/libinput-measure-touchpad-pressure b/tools/libinput-measure-touchpad-pressure
index 89dd117f..9f6a9f24 100755
--- a/tools/libinput-measure-touchpad-pressure
+++ b/tools/libinput-measure-touchpad-pressure
@@ -163,8 +163,8 @@ class Device(object):
prange = p.max - p.min
# libinput defaults
- self.up = int(p.min + 0.12 * prange)
- self.down = int(p.min + 0.10 * prange)
+ self.down = int(p.min + 0.12 * prange)
+ self.up = int(p.min + 0.10 * prange)
self.palm = 130 # the libinput default
self._init_thresholds_from_udev()
@@ -189,7 +189,7 @@ class Device(object):
ud = pyudev.Devices.from_device_file(context, self.path)
v = ud.get('LIBINPUT_ATTR_PRESSURE_RANGE')
if v:
- self.up, self.down = colon_tuple(v)
+ self.down, self.up = colon_tuple(v)
v = ud.get('LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD')
if v: