Commit 734496d9 authored by Konstantin Kharlamov's avatar Konstantin Kharlamov Committed by Peter Hutterer

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.

!4Signed-off-by: Konstantin Kharlamov's avatarKonstantin Kharlamov <Hi-Angel@yandex.ru>
parent 0d6dea5d
......@@ -1518,6 +1518,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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment