X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6062fe5c9e63cae73d1705fecc32587f0b80270f..ec2df34e27ba41f202ecbf096cdfed082a9ddb8f:/src/osx/carbon/frame.cpp diff --git a/src/osx/carbon/frame.cpp b/src/osx/carbon/frame.cpp index 2c9e0f3926..09cd082182 100644 --- a/src/osx/carbon/frame.cpp +++ b/src/osx/carbon/frame.cpp @@ -225,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;