diff options
author | Konstantin Kharlamov <Hi-Angel@yandex.ru> | 2018-06-13 14:38:20 +0300 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-07-03 10:22:12 +1000 |
commit | 8347c9b5b9b4ec6f969cceb15907a9a2ebfb3116 (patch) | |
tree | a6f8698a308cb40031a3e88a9dfd61a7707b91ba | |
parent | 9c43f860ed8d9af46633cb44e935450f1d8165fe (diff) |
touchpad: ignore motion on finger-up
Ignore motion when pressure/touch size fell below the threshold, thus
ending the touch.
Real world significance: subjectively scrolling/cursor positioning with
a touchpad now a bit better on SAMSUNG NP305V5A laptop.
https://gitlab.freedesktop.org/libinput/libinput/merge_requests/4
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
(cherry picked from commit 734496d972152dc9998f884c840550dc34c7088a)
-rw-r--r-- | src/evdev-mt-touchpad.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index a78a6151..a7514a5f 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1522,6 +1522,11 @@ tp_pre_process_state(struct tp_dispatch *tp, uint64_t time) tp_for_each_touch(tp, t) { if (t->state == TOUCH_MAYBE_END) tp_end_touch(tp, t, time); + + /* Ignore motion when pressure/touch size fell below the + * threshold, thus ending the touch */ + if (t->state == TOUCH_END && t->history.count > 0) + t->point = tp_motion_history_offset(t, 0)->point; } } |