mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-22 12:47:04 +00:00
[client] spice: only check for a valid position if needed
This commit is contained in:
parent
c0a3b85580
commit
1a8dfe1cc0
@ -905,9 +905,9 @@ static void handleMouseMoveEvent(int ex, int ey)
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* check if the movement would exit the window */
|
/* check if the movement would exit the window */
|
||||||
if (isValidCursorLocation(pos.x, pos.y) &&
|
if ((newPos.x < 0 || newPos.x >= state.dstRect.w ||
|
||||||
(newPos.x < 0 || newPos.x >= state.dstRect.w ||
|
newPos.y < 0 || newPos.y >= state.dstRect.h) &&
|
||||||
newPos.y < 0 || newPos.y >= state.dstRect.h))
|
isValidCursorLocation(pos.x, pos.y))
|
||||||
{
|
{
|
||||||
/* determine where to move the cursor to taking into account any borders
|
/* determine where to move the cursor to taking into account any borders
|
||||||
* if the aspect ratio is not being forced */
|
* if the aspect ratio is not being forced */
|
||||||
|
Loading…
Reference in New Issue
Block a user