Nav, Focus: Fixed ImGuiWindowFlags_NoBringToFrontOnFocus windows not being restoring focus properly after the main menu bar or last focused window is deactivated.

This commit is contained in:
omar
2018-09-10 20:30:14 +02:00
parent dcef0c0237
commit d5692bff00
5 changed files with 69 additions and 41 deletions

View File

@ -5457,7 +5457,7 @@ void ImGui::EndMainMenuBar()
// When the user has left the menu layer (typically: closed menus through activation of an item), we restore focus to the previous window
ImGuiContext& g = *GImGui;
if (g.CurrentWindow == g.NavWindow && g.NavLayer == 0)
FocusFrontMostActiveWindowIgnoringOne(g.NavWindow);
FocusPreviousWindowIgnoringOne(g.NavWindow);
End();
}