]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/frame.cpp
Forgot header with OSX prefix
[wxWidgets.git] / src / osx / carbon / frame.cpp
index 17df9bcf0d3272bd557b9e9c792b0015e7b93d25..cfa644637270610fddcfb03bd62c11bb533b0488 100644 (file)
@@ -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 )
@@ -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 ;