mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-08 04:40:09 +00:00
Viewports: Todos, Tooltips/menus not automatically forced into their own viewport when the NoMerge flag is set (however the multiplication of viewports makes them more likely to protude and create their own). Win32: try to make primary monitor the first tin the list. (#1542)
This commit is contained in:
parent
d268471285
commit
010757266e
2 changed files with 11 additions and 2 deletions
|
|
@ -3307,10 +3307,11 @@ static void SetWindowViewport(ImGuiWindow* window, ImGuiViewportP* viewport)
|
|||
|
||||
static bool GetWindowAlwaysWantOwnViewport(ImGuiWindow* window)
|
||||
{
|
||||
// Tooltips and menus are not automatically forced into their own viewport when the NoMerge flag is set, however the multiplication of viewports makes them more likely to protude and create their own.
|
||||
ImGuiContext& g = *GImGui;
|
||||
if ((g.IO.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) && (g.IO.ConfigFlags & ImGuiConfigFlags_ViewportsNoMerge))
|
||||
if ((g.IO.ConfigFlags & ImGuiConfigFlags_ViewportsNoMerge) && (g.IO.ConfigFlags & ImGuiConfigFlags_ViewportsEnable))
|
||||
//if (window->DockStatus == ImGuiDockStatus_Floating)
|
||||
if ((window->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_ChildMenu)) == 0)
|
||||
if ((window->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_ChildMenu | ImGuiWindowFlags_Tooltip)) == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue