From 71901414d1b52eb530c47629dce2cfc2b4390ab6 Mon Sep 17 00:00:00 2001 From: Quantum Date: Mon, 24 Jan 2022 00:15:47 -0500 Subject: [PATCH] [client] overlay: realign cursor when turning off overlay This is only done in non-capture mode to avoid messing up games. --- client/src/core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/core.c b/client/src/core.c index b7671d7d..50f66778 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -668,5 +668,11 @@ void core_updateOverlayState(void) core_setGrabQuiet(wasGrabbed); core_invalidatePointer(true); app_invalidateWindow(false); + + if (!g_cursor.grab) + { + g_cursor.realign = true; + core_handleMouseNormal(0, 0); + } } }