1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-02-05 04:10:07 +00:00

Viewports: Setting focus from Platform/OS sets corresponding focus at Dear ImGui level. (#6299)

This commit is contained in:
ocornut 2023-04-05 20:25:05 +02:00
parent ee5ce36745
commit dcb6335bfe
4 changed files with 33 additions and 20 deletions

View file

@ -7088,7 +7088,7 @@ void ImGui::EndMainMenuBar()
// FIXME: With this strategy we won't be able to restore a NULL focus.
ImGuiContext& g = *GImGui;
if (g.CurrentWindow == g.NavWindow && g.NavLayer == ImGuiNavLayer_Main && !g.NavAnyRequest)
FocusTopMostWindowUnderOne(g.NavWindow, NULL);
FocusTopMostWindowUnderOne(g.NavWindow, NULL, NULL);
End();
}