[client] spice: prevent the cursor from escaping while captured

This commit is contained in:
Geoffrey McRae 2021-01-06 08:35:13 +11:00
parent e70f585cfc
commit 09e02b0613

View File

@ -866,10 +866,11 @@ static void handleMouseMoveEvent(int ex, int ey)
/* check if the cursor is in the guests viewport */
const bool inView =
g_cursor.grab || (
ex >= g_state.dstRect.x &&
ex < g_state.dstRect.x + g_state.dstRect.w &&
ey >= g_state.dstRect.y &&
ey < g_state.dstRect.y + g_state.dstRect.h;
ey < g_state.dstRect.y + g_state.dstRect.h);
/* if the cursor has moved in/outside the display area */
if (g_cursor.inView != inView)