From fc42528f134a3aec1f6c34daec6f26390e7b29b5 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 31 Jan 2020 18:28:25 +0100 Subject: [PATCH] When testing for the presence of the ImGuiWindowFlags_NoBringToFrontOnFocus flag we test both the focused/clicked window (which could be a child window) and the root window. --- docs/CHANGELOG.txt | 2 ++ imgui.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 30a2a780..099f8f08 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -78,6 +78,8 @@ Other Changes: - ColorEdit: "Copy As" content-menu tool shows hex values both with/without alpha when available. - MenuBar: Fix minor clipping issue where occasionally a menu text can overlap the right-most border. - Window: Fix SetNextWindowBgAlpha(1.0f) failing to override alpha component. (#3007) [@Albog] +- Window: When testing for the presence of the ImGuiWindowFlags_NoBringToFrontOnFocus flag we + test both the focused/clicked window (which could be a child window) and the root window. - ImDrawList: AddCircle(), AddCircleFilled() API can now auto-tessellate when provided a segment count of zero. Alter tessellation quality with 'style.CircleSegmentMaxError'. [@ShironekoBen] - ImDrawList: Add AddNgon(), AddNgonFilled() API with a guarantee on the explicit segment count. diff --git a/imgui.cpp b/imgui.cpp index 6d44419d..4f2993b4 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6050,7 +6050,7 @@ void ImGui::FocusWindow(ImGuiWindow* window) // Bring to front BringWindowToFocusFront(focus_front_window); - if ((display_front_window->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus) == 0) + if (((window->Flags | display_front_window->Flags) & ImGuiWindowFlags_NoBringToFrontOnFocus) == 0) BringWindowToDisplayFront(display_front_window); }