]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/window_osx.cpp
make sure we have a default handling the quit command, see #12402
[wxWidgets.git] / src / osx / window_osx.cpp
index 7fd9f067d95a2537e3d709688b5062669d085148..14203e39787829921c1889ea53e0234925b1046e 100644 (file)
@@ -1304,7 +1304,6 @@ void wxWindowMac::MacHiliteChanged()
 
 void wxWindowMac::MacEnabledStateChanged()
 {
-    OnEnabled( GetPeer()->IsEnabled() );
 }
 
 //
@@ -1814,6 +1813,8 @@ bool wxWindowMac::MacSetupCursor( const wxPoint& pt )
     if ( wxRect2DInt( clientorigin.x , clientorigin.y , clientsize.x , clientsize.y ).Contains( wxPoint2DInt( pt ) ) )
     {
         wxSetCursorEvent event( pt.x , pt.y );
+        event.SetId(GetId());
+        event.SetEventObject(this);
 
         bool processedEvtSetCursor = HandleWindowEvent(event);
         if ( processedEvtSetCursor && event.HasCursor() )
@@ -2739,13 +2740,13 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event )
             {
                 wxEvtHandler * const handler = ancestor->GetEventHandler();
 
-                wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
+                wxCommandEvent command_event( wxEVT_MENU, command );
                 handled = handler->ProcessEvent( command_event );
 
                 if ( !handled )
                 {
                     // accelerators can also be used with buttons, try them too
-                    command_event.SetEventType(wxEVT_COMMAND_BUTTON_CLICKED);
+                    command_event.SetEventType(wxEVT_BUTTON);
                     handled = handler->ProcessEvent( command_event );
                 }