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.

This commit is contained in:
omar
2020-01-31 18:28:25 +01:00
parent fc41839cab
commit fc42528f13
2 changed files with 3 additions and 1 deletions

View File

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