This makes sense and fixes the regression with "Window" menu commands not
being processed any more after the changes of r71114.
Closes #14207.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71388
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxMDIParentFrame::AddWindowMenu()
{
if ( m_windowMenu )
+ {
+ // For correct handling of the events from this menu we also must
+ // attach it to the menu bar.
+ m_windowMenu->Attach(GetMenuBar());
+
MDIInsertWindowMenu(GetClientWindow(), m_hMenu, GetMDIWindowMenu(this));
+ }
}
void wxMDIParentFrame::RemoveWindowMenu()
{
if ( m_windowMenu )
+ {
MDIRemoveWindowMenu(GetClientWindow(), m_hMenu);
+
+ m_windowMenu->Detach();
+ }
}
void wxMDIParentFrame::UpdateWindowMenu(bool enable)