From 82748df71af117605768c121652da90406e052bb Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 26 Sep 2017 01:12:09 +0200 Subject: [PATCH] WantCaptureMouse: Tweaked logic so WantCaptureMouse can stay false when e.g. hovering over void while an InputText() is active. (#621) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index f392fc1c..f212e76e 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2295,7 +2295,7 @@ void ImGui::NewFrame() if (g.WantCaptureMouseNextFrame != -1) g.IO.WantCaptureMouse = (g.WantCaptureMouseNextFrame != 0); else - g.IO.WantCaptureMouse = (mouse_avail_to_imgui && (g.HoveredWindow != NULL || mouse_any_down)) || (g.ActiveId != 0) || (!g.OpenPopupStack.empty()); + g.IO.WantCaptureMouse = (mouse_avail_to_imgui && (g.HoveredWindow != NULL || mouse_any_down)) || (!g.OpenPopupStack.empty()); g.IO.WantCaptureKeyboard = (g.WantCaptureKeyboardNextFrame != -1) ? (g.WantCaptureKeyboardNextFrame != 0) : (g.ActiveId != 0); g.IO.WantTextInput = (g.WantTextInputNextFrame != -1) ? (g.WantTextInputNextFrame != 0) : 0; g.MouseCursor = ImGuiMouseCursor_Arrow;