]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/frame.cpp
Add missing WXK constants for the control keys
[wxWidgets.git] / src / osx / carbon / frame.cpp
index 451ac4a964e99efd121e6de4765e52f995cc511f..09cd082182a673d93e50044291a52a7e7d5f9a10 100644 (file)
@@ -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;