diff --git a/imgui.cpp b/imgui.cpp index a849ba5a..b77a00aa 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2085,7 +2085,10 @@ void ImGui::NewFrame() if (ImGuiWindow* modal_window = GetFrontMostModalRootWindow()) { g.ModalWindowDarkeningRatio = ImMin(g.ModalWindowDarkeningRatio + g.IO.DeltaTime * 6.0f, 1.0f); - if (g.HoveredRootWindow != modal_window) + ImGuiWindow* window = g.HoveredRootWindow; + while (window && window != modal_window) + window = window->ParentWindow; + if (!window) g.HoveredRootWindow = g.HoveredWindow = NULL; } else diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 9a6a8522..3a2296e6 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1244,6 +1244,9 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Text("All those beautiful files will be deleted.\nThis operation cannot be undone!\n\n"); ImGui::Separator(); + //static int dummy_i = 0; + //ImGui::Combo("Combo", &dummy_i, "Delete\0Delete harder\0"); + static bool dont_ask_me_next_time = false; ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0)); ImGui::Checkbox("Don't ask me next time", &dont_ask_me_next_time);