]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/frame.cpp
guarding open combo box against AppDefined NSEvents issued by wxEventLoop::WakeUp...
[wxWidgets.git] / src / osx / carbon / frame.cpp
index 2c9e0f39264e072dda82723fa3612448f1754fa4..09cd082182a673d93e50044291a52a7e7d5f9a10 100644 (file)
@@ -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;