X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/baac715443ebb90983c07cd1d29640a0b6410c53..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/osx/carbon/frame.cpp?ds=sidebyside diff --git a/src/osx/carbon/frame.cpp b/src/osx/carbon/frame.cpp index 451ac4a964..09cd082182 100644 --- a/src/osx/carbon/frame.cpp +++ b/src/osx/carbon/frame.cpp @@ -29,7 +29,6 @@ BEGIN_EVENT_TABLE(wxFrame, wxFrameBase) EVT_ACTIVATE(wxFrame::OnActivate) EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) - EVT_SIZE(wxFrame::OnSize) END_EVENT_TABLE() #define WX_MAC_STATUSBAR_HEIGHT 18 @@ -51,7 +50,6 @@ bool wxFrame::Create(wxWindow *parent, long style, const wxString& name) { - if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) return false; @@ -217,14 +215,6 @@ void wxFrame::OnActivate(wxActivateEvent& event) } } - -void wxFrame::OnSize(wxSizeEvent& event) -{ - PositionBars(); - - event.Skip(); -} - #if wxUSE_MENUS void wxFrame::DetachMenuBar() { @@ -235,8 +225,10 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar ) { #if wxOSX_USE_CARBON wxFrame* tlf = wxDynamicCast( wxNonOwnedWindow::GetFromWXWindow( (WXWindow) FrontNonFloatingWindow() ) , wxFrame ); +#elif wxOSX_USE_COCOA + wxFrame* tlf = wxDynamicCast( wxNonOwnedWindow::GetFromWXWindow( wxOSXGetMainWindow() ) , wxFrame ); #else - wxFrame* tlf = (wxFrame*) wxTheApp->GetTopWindow(); + wxFrame* tlf = wxDynamicCast( wxTheApp->GetTopWindow(), wxFrame ); #endif bool makeCurrent = false;