From 47dfaffa0e83f7b1c25405014cb496689c9a9096 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Thu, 8 Dec 2011 13:20:46 +0200 Subject: [PATCH] evdev: run flush_motion only when needed Signed-off-by: Tiago Vignatti --- compositor/evdev.c | 3 +++ 1 file changed, 3 insertions(+) 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 @@ static void 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); -- 2.7.4