mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] spice: prevent the cursor from escaping while captured
This commit is contained in:
parent
e70f585cfc
commit
09e02b0613
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user