From 7ee623d9b1385fffecc989b5a9fb371698bad060 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 12 Apr 2020 18:58:06 +0200 Subject: [PATCH] Internals: FocusScope not inherited by popups, modals. Amend a5041c88 2ebe08be) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 2aaddb67..5614f1e7 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5902,7 +5902,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) window->DC.NavLayerCurrentMask = (1 << ImGuiNavLayer_Main); window->DC.NavLayerActiveMask = window->DC.NavLayerActiveMaskNext; window->DC.NavLayerActiveMaskNext = 0x00; - window->DC.NavFocusScopeIdCurrent = parent_window ? parent_window->DC.NavFocusScopeIdCurrent : 0; + window->DC.NavFocusScopeIdCurrent = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window->DC.NavFocusScopeIdCurrent : 0; window->DC.NavHideHighlightOneFrame = false; window->DC.NavHasScroll = (window->ScrollMax.y > 0.0f);