|
|
@ -5623,6 +5623,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
|
// We don't default to the main viewport because.
|
|
|
|
// We don't default to the main viewport because.
|
|
|
|
if (window->WindowClass.ParentViewportId)
|
|
|
|
if (window->WindowClass.ParentViewportId)
|
|
|
|
window->Viewport->ParentViewportId = window->WindowClass.ParentViewportId;
|
|
|
|
window->Viewport->ParentViewportId = window->WindowClass.ParentViewportId;
|
|
|
|
|
|
|
|
else if ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) && parent_window_in_stack)
|
|
|
|
|
|
|
|
window->Viewport->ParentViewportId = parent_window_in_stack->Viewport->ID;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
window->Viewport->ParentViewportId = g.IO.ConfigViewportsNoDefaultParent ? 0 : IMGUI_VIEWPORT_DEFAULT_ID;
|
|
|
|
window->Viewport->ParentViewportId = g.IO.ConfigViewportsNoDefaultParent ? 0 : IMGUI_VIEWPORT_DEFAULT_ID;
|
|
|
|
if (window->WindowClass.ViewportFlagsOverrideMask)
|
|
|
|
if (window->WindowClass.ViewportFlagsOverrideMask)
|
|
|
|