From: Peter Hutterer Date: Fri, 7 Feb 2014 01:09:08 +0000 (+1000) Subject: evdev-touchpad: don't post motion events for 0/0 deltas X-Git-Tag: 0.1.0~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=993a3b8ebdc39d8e5520cc2ce4c76741684d73d7;p=platform%2Fupstream%2Flibinput.git evdev-touchpad: don't post motion events for 0/0 deltas Signed-off-by: Peter Hutterer --- 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(