[client] mouse: prevent processing out of capture mode with invalid data

If the guest cursor state & position is unknown we can not rely on the
information to detect edge crossings. As such only allow cursor input if
LG is operating in capture mode.
This commit is contained in:
Geoffrey McRae 2021-01-16 21:37:43 +11:00
parent 165c2c3566
commit 0690eacc9b

View File

@ -977,13 +977,9 @@ static void guestCurToLocal(struct DoublePoint *local)
void app_handleMouseNormal(double ex, double ey)
{
/* if we don't have the current cursor pos just send cursor movements */
// prevent cursor handling outside of capture if the position is not known
if (!g_cursor.guest.valid)
{
if (g_cursor.grab)
app_handleMouseGrabbed(ex, ey);
return;
}
/* scale the movement to the guest */
if (g_cursor.useScale && params.scaleMouseInput)