[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.
This commit is contained in:
Tudor Brindus 2021-01-31 19:05:40 -05:00 committed by Geoffrey McRae
parent ff0a859ceb
commit e6ebcec689

View File

@ -1450,6 +1450,9 @@ void app_handleMouseBasic()
int x = (int) round((px - local.x) / g_cursor.dpiScale); int x = (int) round((px - local.x) / g_cursor.dpiScale);
int y = (int) round((py - local.y) / 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.x += x;
g_cursor.guest.y += y; g_cursor.guest.y += y;