X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b6d4a1afded003fb3ee50a16a5f7d56bcec186d7..b28a58d71c645a11d5ccacecbff78bfe58683105:/src/mac/carbon/menu.cpp diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index 328ce5605c..a2df94bd84 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -37,10 +37,8 @@ // ---------------------- #include -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler) IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) -#endif // the (popup) menu title has this special id static const int idMenuTitle = -3; @@ -569,6 +567,8 @@ auto-merge for MDI in case this will be necessary wxMenuBar* wxMenuBar::s_macInstalledMenuBar = NULL ; wxMenuBar* wxMenuBar::s_macCommonMenuBar = NULL ; +bool wxMenuBar::s_macAutoWindowMenu = true ; +WXHMENU wxMenuBar::s_macWindowMenuHandle = NULL ; void wxMenuBar::Init() { @@ -777,6 +777,14 @@ void wxMenuBar::MacInstallMenuBar() UMASetMenuItemShortcut( GetMenuHandle( kwxMacAppleMenuId ) , 1 , entry ) ; } } + if ( GetAutoWindowMenu() ) + { + if ( MacGetWindowMenuHMenu() == NULL ) + { + CreateStandardWindowMenu( 0 , (MenuHandle*) &s_macWindowMenuHandle ) ; + } + InsertMenu( (MenuHandle) MacGetWindowMenuHMenu() , 0 ) ; + } ::DrawMenuBar() ; s_macInstalledMenuBar = this; }