mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-30 18:50:08 +01:00
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 734496d972)
This commit is contained in:
parent
9c43f860ed
commit
8347c9b5b9
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue