| 9302 | } |
| 9303 | |
| 9304 | void ImGui::EndMainMenuBar() |
| 9305 | { |
| 9306 | ImGuiContext& g = *GImGui; |
| 9307 | IM_ASSERT_USER_ERROR_RET(g.CurrentWindow->DC.MenuBarAppending, "Calling EndMainMenuBar() not from a menu-bar!"); // Not technically testing that it is the main menu bar |
| 9308 | |
| 9309 | EndMenuBar(); |
| 9310 | g.CurrentWindow->Flags |= ImGuiWindowFlags_NoSavedSettings; // Restore _NoSavedSettings (#8356) |
| 9311 | |
| 9312 | // When the user has left the menu layer (typically: closed menus through activation of an item), we restore focus to the previous window |
| 9313 | // FIXME: With this strategy we won't be able to restore a NULL focus. |
| 9314 | if (g.CurrentWindow == g.NavWindow && g.NavLayer == ImGuiNavLayer_Main && !g.NavAnyRequest && g.ActiveId == 0) |
| 9315 | FocusTopMostWindowUnderOne(g.NavWindow, NULL, NULL, ImGuiFocusRequestFlags_UnlessBelowModal | ImGuiFocusRequestFlags_RestoreFocusedChild); |
| 9316 | |
| 9317 | End(); |
| 9318 | } |
| 9319 | |
| 9320 | static bool IsRootOfOpenMenuSet() |
| 9321 | { |
nothing calls this directly
no outgoing calls
no test coverage detected