summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-03-23 11:00:46 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-05-03 19:15:18 +1000
commita4036a33ca6ca8da7d2417cac6b840a89b295e5f (patch)
treeef179ef646c92152be7efb0bc7020024440a1d82 /udev
parent3d81f1179f007dd555ccf0f183a02494ce22d3a8 (diff)
downloadlibinput-a4036a33ca6ca8da7d2417cac6b840a89b295e5f.tar.gz
udev: copy the trackpoint sensitivity directly from sysfs
Rather than going the roundabout way of having systemd set the sensitivity followed by us reading that udev property and hoping, just take the sensitivity directly from sysfs. This makes us basically independent of what systemd does (or the lack of systemd, where that is a problem). It does remove the chance of users to trick libinput by manually adjusting the sensitivity after the udev rules kicked in, but seriously, we should work on fixing acceleration properly in that case. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'udev')
-rw-r--r--udev/90-libinput-model-quirks.rules.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput-model-quirks.rules.in
index 5ddc0ba4..7c73f0a6 100644
--- a/udev/90-libinput-model-quirks.rules.in
+++ b/udev/90-libinput-model-quirks.rules.in
@@ -48,4 +48,8 @@ KERNELS=="input*", \
KERNELS=="input*", \
IMPORT{builtin}="hwdb 'libinput:name:$attr{name}:dt:$attr{[devicetree/base]model}'"
+ENV{ID_INPUT_POINTINGSTICK}=="1", \
+ ATTRS{sensitivity}=="?*", \
+ ENV{LIBINPUT_ATTR_TRACKPOINT_SENSITIVITY}="$attr{sensitivity}"
+
LABEL="libinput_model_quirks_end"