mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-15 05:23:02 +00:00
[client] spice: prevent the cursor from escaping while captured
This commit is contained in:
parent
e70f585cfc
commit
09e02b0613
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue