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

View File

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