mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-24 20:30:04 +01:00
touchpad: reset the wobble detection history for y-only changes
Otherwise we may detect wobble despite having a series of valid y movements, e.g. the following sequence was detected as wobble: x: 1 y: 0 x: 0 y: 1 x: 0 y: 2 x: 0 y: 2 x: 0 y: 1 x: -1 y: 0 x: 1 y: 0 Avoid this by resetting the history when we get a dx == 0 event. It'll take longer for real wobble to be detected but it reduces the number of false positives. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
795657a0a1
commit
be69bcef2c
1 changed files with 1 additions and 4 deletions
|
|
@ -171,10 +171,7 @@ tp_detect_wobbling(struct tp_dispatch *tp,
|
|||
tp->hysteresis.last_motion_time = time;
|
||||
t->last_point = t->point;
|
||||
|
||||
if (dx == 0 && dy != 0) /* ignore y-only changes */
|
||||
return;
|
||||
|
||||
if (dtime > ms2us(40)) {
|
||||
if ((dx == 0 && dy != 0) || dtime > ms2us(40)) {
|
||||
t->hysteresis.x_motion_history = 0;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue