From 132d8c5a9943cb9d4b92860b4dca1c7540c4b156 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 14 Sep 2018 11:37:17 +0200 Subject: [PATCH] Viewport: Increased threshold for setting ImGuiViewportFlags_NoFocusOnAppearing. (#1542), 2 doesn't seem enough with some docking setup. --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 86f41189..31bd521c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -7552,7 +7552,7 @@ void ImGui::UpdatePlatformWindows() // Show window. On startup ensure platform window don't get focus if (is_new_window) { - if (g.FrameCount < 2) + if (g.FrameCount < 3) // Give a few frames for the application to stabilize (nested contents may lead to viewport being created a few frames late) viewport->Flags |= ImGuiViewportFlags_NoFocusOnAppearing; g.PlatformIO.Platform_ShowWindow(viewport); }