evdev: use a different filter for low resolution touchpad on the Lenovo X230
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>
Thu, 23 Apr 2015 18:32:40 +0000 (14:32 -0400)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 27 Apr 2015 00:00:10 +0000 (10:00 +1000)
commit26ceea3e3b6dbd83d175ae3b4f862d0792af812c
tree827b0b5bafbf88a28259a7da2212ec4685c1493f
parent06b4d83c4aa96570cc31abc6c299e8b14e015885
evdev: use a different filter for low resolution touchpad on the Lenovo X230

Those touchpads presents an actual lower resolution that what is
advertised.

We see some jumps from the cursor due to the big steps in X and Y
when we are receiving data.

For instance, we receive:

E: 13.471932 0003 0000 16366    # EV_ABS / ABS_X                16366
E: 13.471932 0003 0001 9591     # EV_ABS / ABS_Y                9591
E: 13.471932 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 13.479924 0003 0000 16316    # EV_ABS / ABS_X                16316
E: 13.479924 0003 0001 9491     # EV_ABS / ABS_Y                9491
E: 13.479924 0000 0000 0000     # ------------ SYN_REPORT (0) ----------
E: 13.487939 0003 0000 16271    # EV_ABS / ABS_X                16271
E: 13.487939 0003 0001 9403     # EV_ABS / ABS_Y                9403
E: 13.487939 0000 0000 0000     # ------------ SYN_REPORT (0) ----------

-> jumps of ~50 in X in each report, and ~100 for Y.

Apply a factor to minimize those jumps at low speed, and try
keeping the same feeling as regular touchpads at high speed.
It still feels slower but it is usable at least

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad.c
src/evdev.c
src/evdev.h
src/filter.c
src/filter.h
udev/90-libinput-model-quirks.hwdb