1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-30 18:34:34 +01:00

Window refresh policy: extend tests to any window in the begin stack. (#7797)

This commit is contained in:
ocornut 2024-08-01 22:40:09 +02:00
parent 531364d728
commit 6864a7f839

View File

@ -6522,9 +6522,11 @@ void ImGui::UpdateWindowSkipRefresh(ImGuiWindow* window)
return;
if (window->Hidden) // If was hidden (previous frame)
return;
if ((g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_RefreshOnHover) && g.HoveredWindow && window->RootWindow == g.HoveredWindow->RootWindow)
if ((g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_RefreshOnHover) && g.HoveredWindow)
if (window->RootWindow == g.HoveredWindow->RootWindow || IsWindowWithinBeginStackOf(g.HoveredWindow->RootWindow, window))
return;
if ((g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_RefreshOnFocus) && g.NavWindow && window->RootWindow == g.NavWindow->RootWindow)
if ((g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_RefreshOnFocus) && g.NavWindow)
if (window->RootWindow == g.NavWindow->RootWindow || IsWindowWithinBeginStackOf(g.NavWindow->RootWindow, window))
return;
window->DrawList = NULL;
window->SkipRefresh = true;