From 116a484498d3be1fe89f32bcc1607040101bd0ff Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 25 Mar 2014 13:37:19 +1000 Subject: [PATCH] Only post rel motion events if we have a non-zero delta We trunc the li_fixed_t to int, so we don't always have a delta to post Signed-off-by: Peter Hutterer --- src/libinput.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libinput.c b/src/libinput.c index fb19de9..626fe1f 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -350,7 +350,8 @@ xf86libinput_handle_motion(InputInfoPtr pInfo, struct libinput_event_pointer *ev x = li_fixed_to_int(x); y = li_fixed_to_int(y); - xf86PostMotionEvent(dev, Relative, 0, 2, x, y); + if (x || y) + xf86PostMotionEvent(dev, Relative, 0, 2, x, y); } static void