touchpad: ignore the ALPS jump to 4095/0
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 26 Aug 2020 01:59:47 +0000 (11:59 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 7 Sep 2020 02:13:40 +0000 (02:13 +0000)
commit0c5112155600629fc6ac8d927d66118554180ecc
tree88536e70ab7ec1280714b06e94638e68ef0f0899
parent9f8b9f5f532edcc2698e2ffca9d19bb1bf6054cc
touchpad: ignore the ALPS jump to 4095/0

Some ALPS touchpad send the occasional 4095/0 event on slot 1 during
two-finger interaction before snapping back to the actual position of the
finger. There doesn't seem to be a specific heuristic to predict this so let's
hardcode those values. When detected, overwrite the current touch point with
the position of the last point. This will likely cause a small pointer jump
when the finger later moves to the real position but based on #492 this could
be a second later, so all bets are off anyway.

Fixes https://gitlab.freedesktop.org/libinput/libinput/-/issues/492

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
doc/user/touchpad-jumping-cursors.rst
src/evdev-mt-touchpad.c