evdev: run flush_motion only when needed

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/compositor/evdev.c b/compositor/evdev.c
index c4a861f..83812bf 100644
--- a/compositor/evdev.c
+++ b/compositor/evdev.c
@@ -221,6 +221,9 @@
 evdev_flush_motion(struct wl_input_device *device, uint32_t time,
 		   struct evdev_motion_accumulator *accum)
 {
+	if (!accum->type)
+		return;
+
 	if (accum->type == EVDEV_RELATIVE_MOTION)
 		notify_motion(device, time,
 			      device->x + accum->dx, device->y + accum->dy);