Переглянути джерело

Viewport: Popups by default merge into parent/host viewport as they have no decoration (same as menu/child). (#1542)

omar 6 роки тому
батько
коміт
8563ef3ce4
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -7754,7 +7754,7 @@ static bool ImGui::GetWindowAlwaysWantOwnViewport(ImGuiWindow* window)
     ImGuiContext& g = *GImGui;
     ImGuiContext& g = *GImGui;
     if (g.IO.ConfigViewportsNoAutoMerge && (g.ConfigFlagsForFrame & ImGuiConfigFlags_ViewportsEnable))
     if (g.IO.ConfigViewportsNoAutoMerge && (g.ConfigFlagsForFrame & ImGuiConfigFlags_ViewportsEnable))
         if (!window->DockIsActive)
         if (!window->DockIsActive)
-            if ((window->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_ChildMenu | ImGuiWindowFlags_Tooltip)) == 0)
+            if ((window->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_ChildMenu | ImGuiWindowFlags_Tooltip | ImGuiWindowFlags_Popup)) == 0)
                 return true;
                 return true;
     return false;
     return false;
 }
 }