[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.
This commit is contained in:
Quantum 2021-09-14 18:23:32 -04:00 committed by Geoffrey McRae
parent 72f3a9f3cf
commit df4a964496

View File

@ -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;
}