Window refresh policy: extend tests to any window in the begin stack. (#7797)
This commit is contained in:
parent
531364d728
commit
6864a7f839
10
imgui.cpp
10
imgui.cpp
@ -6522,10 +6522,12 @@ void ImGui::UpdateWindowSkipRefresh(ImGuiWindow* window)
|
|||||||
return;
|
return;
|
||||||
if (window->Hidden) // If was hidden (previous frame)
|
if (window->Hidden) // If was hidden (previous frame)
|
||||||
return;
|
return;
|
||||||
if ((g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_RefreshOnHover) && g.HoveredWindow && window->RootWindow == g.HoveredWindow->RootWindow)
|
if ((g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_RefreshOnHover) && g.HoveredWindow)
|
||||||
return;
|
if (window->RootWindow == g.HoveredWindow->RootWindow || IsWindowWithinBeginStackOf(g.HoveredWindow->RootWindow, window))
|
||||||
if ((g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_RefreshOnFocus) && g.NavWindow && window->RootWindow == g.NavWindow->RootWindow)
|
return;
|
||||||
return;
|
if ((g.NextWindowData.RefreshFlagsVal & ImGuiWindowRefreshFlags_RefreshOnFocus) && g.NavWindow)
|
||||||
|
if (window->RootWindow == g.NavWindow->RootWindow || IsWindowWithinBeginStackOf(g.NavWindow->RootWindow, window))
|
||||||
|
return;
|
||||||
window->DrawList = NULL;
|
window->DrawList = NULL;
|
||||||
window->SkipRefresh = true;
|
window->SkipRefresh = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user