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:
omar
2018-04-23 23:00:14 +02:00
parent d268471285
commit 010757266e
2 changed files with 11 additions and 2 deletions

View File

@ -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;
}