mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Fixed crash when appending with BeginMainMenuBar() more than once and no other window are showing. (#2567) + comments
This commit is contained in:
@ -5850,7 +5850,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
|
||||
// FIXME: With this strategy we won't be able to restore a NULL focus.
|
||||
ImGuiContext& g = *GImGui;
|
||||
if (g.CurrentWindow == g.NavWindow && g.NavLayer == 0)
|
||||
if (g.CurrentWindow == g.NavWindow && g.NavLayer == 0 && !g.NavAnyRequest)
|
||||
FocusTopMostWindowUnderOne(g.NavWindow, NULL);
|
||||
|
||||
End();
|
||||
|
Reference in New Issue
Block a user