From 44f815409d244e449ac0f632f5cfa260d8acd385 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 5 Aug 2021 06:55:41 +1000 Subject: [PATCH] [client] imgui: ensure the pointer shape is correct Since we only update imgui's cursor location when the overlay is enabled, if the last cursor position was showing a shape that is incorrect when we re-enter the overlay the cursor will be wrong. This corrects this by updating the location as we enter overlay mode. --- client/src/app.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/app.c b/client/src/app.c index 385f89bf..3bc9283d 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -868,6 +868,8 @@ void app_setOverlay(bool enable) wasGrabbed = g_cursor.grab; g_state.io->ConfigFlags &= ~ImGuiConfigFlags_NoMouse; + g_state.io->MousePos = (ImVec2) { g_cursor.pos.x, g_cursor.pos.y }; + core_setGrabQuiet(false); core_setCursorInView(false); }