From 993a3b8ebdc39d8e5520cc2ce4c76741684d73d7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Feb 2014 11:09:08 +1000 Subject: [PATCH] evdev-touchpad: don't post motion events for 0/0 deltas Signed-off-by: Peter Hutterer --- src/evdev-touchpad.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/evdev-touchpad.c b/src/evdev-touchpad.c index 9e95906c..d65ebb24 100644 --- a/src/evdev-touchpad.c +++ b/src/evdev-touchpad.c @@ -533,11 +533,12 @@ touchpad_update_state(struct touchpad_dispatch *touchpad, uint32_t time) filter_motion(touchpad, &dx, &dy, time); if (touchpad->finger_state == TOUCHPAD_FINGERS_ONE) { - pointer_notify_motion( - base, - time, - li_fixed_from_double(dx), - li_fixed_from_double(dy)); + if (dx != 0 || dy != 0) + pointer_notify_motion( + base, + time, + li_fixed_from_double(dx), + li_fixed_from_double(dy)); } else if (touchpad->finger_state == TOUCHPAD_FINGERS_TWO) { if (dx != 0.0) pointer_notify_axis( -- 2.34.1