mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-30 18:34:34 +01:00
Window refresh policy: fixed child window of skiprefresh windows not displaying. (#7797)
Amend d4495446d
. (#3515, #4763, #7556, #5116 , #4076, #2749, #2268)
This commit is contained in:
parent
9f8f5e1145
commit
531364d728
13
imgui.cpp
13
imgui.cpp
@ -6531,6 +6531,17 @@ void ImGui::UpdateWindowSkipRefresh(ImGuiWindow* window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SetWindowActiveForSkipRefresh(ImGuiWindow* window)
|
||||||
|
{
|
||||||
|
window->Active = true;
|
||||||
|
for (ImGuiWindow* child : window->DC.ChildWindows)
|
||||||
|
if (!child->Hidden)
|
||||||
|
{
|
||||||
|
child->Active = child->SkipRefresh = true;
|
||||||
|
SetWindowActiveForSkipRefresh(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// When a modal popup is open, newly created windows that want focus (i.e. are not popups and do not specify ImGuiWindowFlags_NoFocusOnAppearing)
|
// When a modal popup is open, newly created windows that want focus (i.e. are not popups and do not specify ImGuiWindowFlags_NoFocusOnAppearing)
|
||||||
// should be positioned behind that modal window, unless the window was created inside the modal begin-stack.
|
// should be positioned behind that modal window, unless the window was created inside the modal begin-stack.
|
||||||
// In case of multiple stacked modals newly created window honors begin stack order and does not go below its own modal parent.
|
// In case of multiple stacked modals newly created window honors begin stack order and does not go below its own modal parent.
|
||||||
@ -7233,7 +7244,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
{
|
{
|
||||||
// Skip refresh always mark active
|
// Skip refresh always mark active
|
||||||
if (window->SkipRefresh)
|
if (window->SkipRefresh)
|
||||||
window->Active = true;
|
SetWindowActiveForSkipRefresh(window);
|
||||||
|
|
||||||
// Append
|
// Append
|
||||||
SetCurrentWindow(window);
|
SetCurrentWindow(window);
|
||||||
|
Loading…
Reference in New Issue
Block a user