X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e0e2cbbe946954db58b28aab3d9cc207987a6a5a..c315587c21ed44e54fbb3c1b36f0f70f78314081:/src/osx/carbon/frame.cpp diff --git a/src/osx/carbon/frame.cpp b/src/osx/carbon/frame.cpp index 5c2ada2de0..87843156b5 100644 --- a/src/osx/carbon/frame.cpp +++ b/src/osx/carbon/frame.cpp @@ -61,7 +61,8 @@ bool wxFrame::Create(wxWindow *parent, wxFrame::~wxFrame() { - m_isBeingDeleted = true; + SendDestroyEvent(); + DeleteAllBars(); } @@ -99,7 +100,9 @@ bool wxFrame::Enable(bool enable) return false; #if wxUSE_MENUS - if ( m_frameMenuBar && m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar() ) + // we should always enable/disable the menubar, even if we are not current, otherwise + // we might miss some state change later (happened eg in the docview sample after PrintPreview) + if ( m_frameMenuBar /*&& m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar()*/) { int iMaxMenu = m_frameMenuBar->GetMenuCount(); for ( int i = 0 ; i < iMaxMenu ; ++ i ) @@ -150,7 +153,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) wxSysColourChangedEvent event2; event2.SetEventObject( m_frameStatusBar ); - m_frameStatusBar->ProcessEvent(event2); + m_frameStatusBar->GetEventHandler()->ProcessEvent(event2); } #endif // wxUSE_STATUSBAR @@ -360,7 +363,7 @@ void wxFrame::PositionToolBar() int cw, ch; GetSize( &cw , &ch ) ; - + int statusX = 0 ; int statusY = 0 ;