should be changed to the common menubar or remain installed.
* Add back some assertions to ensure the code is working as intended.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24108
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void SetMainMenuBar(wxMenuBar* menubar);
void CocoaInternalIdle();
void WindowDidBecomeKey(wxTopLevelWindowNative *win);
- void WindowDidResignKey(wxTopLevelWindowNative *win);
+ void WindowDidResignKey(wxTopLevelWindowNative *win, bool uninstallMenuBar = true);
void WindowDidBecomeMain(wxTopLevelWindowNative *win);
void WindowDidResignMain(wxTopLevelWindowNative *win);
void UpdateWindowMenuBar(wxTopLevelWindowNative *win);
void wxMenuBarManager::WindowDidBecomeKey(wxTopLevelWindowNative *win)
{
-// wxASSERT(!m_windowKey);
+ wxASSERT(!m_windowKey);
m_windowKey = win;
InstallMenuBarForWindow(win);
}
-void wxMenuBarManager::WindowDidResignKey(wxTopLevelWindowNative *win)
+void wxMenuBarManager::WindowDidResignKey(wxTopLevelWindowNative *win, bool uninstallMenuBar)
{
wxASSERT(m_windowKey==win);
m_windowKey = NULL;
- SetMenuBar(NULL);
+ if(uninstallMenuBar)
+ SetMenuBar(NULL);
}
void wxMenuBarManager::WindowDidBecomeMain(wxTopLevelWindowNative *win)
{
-// wxASSERT(!m_windowMain);
+ wxASSERT(!m_windowMain);
m_windowMain = win;
}