mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-28 19:00:17 +01:00
touchpad: only post motion events if we have motion
Because our delta calculation factors in previous events on touchpads (to reduce jitter) we may get a nonzero delta if we have an event that doesn't actually change x or y. Drop the t->dirty workaround introduced ina608d9d, an event that virtually disappears can mess up our state machines. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commitbc17185f42)
This commit is contained in:
parent
915cd9d999
commit
2253cf69cb
2 changed files with 3 additions and 5 deletions
|
|
@ -500,7 +500,8 @@ tp_gesture_post_events(struct tp_dispatch *tp, uint64_t time)
|
|||
|
||||
switch (tp->gesture.finger_count) {
|
||||
case 1:
|
||||
tp_gesture_post_pointer_motion(tp, time);
|
||||
if (tp->queued & TOUCHPAD_EVENT_MOTION)
|
||||
tp_gesture_post_pointer_motion(tp, time);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
|
|
|
|||
|
|
@ -904,10 +904,7 @@ tp_need_motion_history_reset(struct tp_dispatch *tp, uint64_t time)
|
|||
if (tp->device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) {
|
||||
if (tp->queued & TOUCHPAD_EVENT_MOTION) {
|
||||
if (tp->quirks.nonmotion_event_count > 10) {
|
||||
struct tp_touch *t;
|
||||
|
||||
tp_for_each_touch(tp, t)
|
||||
t->dirty = false;
|
||||
tp->queued &= ~TOUCHPAD_EVENT_MOTION;
|
||||
rc = true;
|
||||
}
|
||||
tp->quirks.nonmotion_event_count = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue