From 8f4e0f6b50cb5390edcf792bd8b9d125c0c8b9fa Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 12 Jan 2021 17:54:23 -0500 Subject: [PATCH] [client] spice/wayland: ignore mouse moves when dpiScale is unknown This prevents division by zero and sending invalid information to spice. --- client/src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/main.c b/client/src/main.c index 6a5f5ca2..5acd5e34 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -920,6 +920,9 @@ static void guestCurToLocal(struct DoublePoint *local) // capture mode. static void handleMouseWayland() { + if (g_cursor.guest.dpiScale == 0) + return; + /* translate the guests position to our coordinate space */ struct DoublePoint local; guestCurToLocal(&local);