evdev-touchpad: don't post motion events for 0/0 deltas
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 7 Feb 2014 01:09:08 +0000 (11:09 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 17 Feb 2014 04:35:10 +0000 (14:35 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-touchpad.c

index 9e95906cba849c74c9018b76e6dc326b0b5cbbb5..d65ebb24033dadef2908c0ecb118518c92c6c040 100644 (file)
@@ -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(