Modal: fixed non-child window stacked over a modal losing its hoverabilty/focusability (#615, #604)

This commit is contained in:
ocornut
2016-05-10 17:02:10 +02:00
parent b630cb5b42
commit 8648346eab
2 changed files with 7 additions and 1 deletions

View File

@ -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