mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 22:26:34 +00:00
Viewport: Popups and Tooltips viewports are correctly parented to the parent window's viewport. (#2409, #1542)
This commit is contained in:
parent
f7db4fad31
commit
3ead9820f7
@ -5623,6 +5623,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
// We don't default to the main viewport because.
|
||||
if (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
|
||||
window->Viewport->ParentViewportId = g.IO.ConfigViewportsNoDefaultParent ? 0 : IMGUI_VIEWPORT_DEFAULT_ID;
|
||||
if (window->WindowClass.ViewportFlagsOverrideMask)
|
||||
|
Loading…
Reference in New Issue
Block a user