From 0690eacc9b766befb13757420c13e2dba86f46f4 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 16 Jan 2021 21:37:43 +1100 Subject: [PATCH] [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. --- client/src/main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index 0018d5e4..dda20544 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -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)