X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/524c47aa3adf2af11a3069fd5da035a604f08f66..4a53f7010a8b65790c2e053ec8374244be2d85ad:/src/osx/carbon/frame.cpp diff --git a/src/osx/carbon/frame.cpp b/src/osx/carbon/frame.cpp index 17df9bcf0d..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 @@ -215,14 +218,14 @@ void wxFrame::OnActivate(wxActivateEvent& event) } } -void wxFrame::HandleResized( long timestamp ) +void wxFrame::HandleResized( double timestampsec ) { // according to the other ports we handle this within the OS level // resize event, not within a wxSizeEvent PositionBars(); - wxNonOwnedWindow::HandleResized( timestamp ); + wxNonOwnedWindow::HandleResized( timestampsec ); } #if wxUSE_MENUS @@ -360,7 +363,7 @@ void wxFrame::PositionToolBar() int cw, ch; GetSize( &cw , &ch ) ; - + int statusX = 0 ; int statusY = 0 ;