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.
diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index 30a2a78..099f8f0 100644
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -78,6 +78,8 @@
 - 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 6d44419..4f2993b 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -6050,7 +6050,7 @@
 
     // 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);
 }