From df4a9644963a9d888d6c981f2d4473c329f6d064 Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 14 Sep 2021 18:23:32 -0400 Subject: [PATCH] [client] spice: stop if pointer left during guest warp This prevents attempts to grab the pointer after the guest side warp finishes if the pointer has left the window in the meantime. On Wayland, this would result in the pointer moving to the middle of the window when the confine is created. --- client/src/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/core.c b/client/src/core.c index e7b2be18..01d5fcab 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -440,6 +440,10 @@ void core_handleMouseNormal(double ex, double ey) g_cursor.guest.x = msg.x; g_cursor.guest.y = msg.y; g_cursor.realign = false; + + if (!g_cursor.inWindow) + return; + core_setCursorInView(true); return; }