From e6ebcec689138a122f04f915d9f82c17b7487177 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sun, 31 Jan 2021 19:05:40 -0500 Subject: [PATCH] [client] spice: don't send zero deltas for Wayland input While a compositor will never send us 0-delta motion events, they can still end up as 0-deltas post-projection, consuming QEMU buffer space for no reason. This should help with mouse skipping issues. --- client/src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/main.c b/client/src/main.c index 1b996584..542156d9 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1450,6 +1450,9 @@ void app_handleMouseBasic() int x = (int) round((px - local.x) / g_cursor.dpiScale); int y = (int) round((py - local.y) / g_cursor.dpiScale); + if (!x && !y) + return; + g_cursor.guest.x += x; g_cursor.guest.y += y;