From: Tiago Vignatti Date: Thu, 8 Dec 2011 11:20:46 +0000 (+0200) Subject: evdev: run flush_motion only when needed X-Git-Tag: upstream/0.1.8~3150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12c05b74adcb6b84aaea8ccb1324c8005faa7ff0;p=profile%2Fivi%2Fweston-ivi-shell.git evdev: run flush_motion only when needed Signed-off-by: Tiago Vignatti --- 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);