]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/app.cpp
added our own implementation of strto[u]ll() if the system doesn't have one (patch...
[wxWidgets.git] / src / mac / carbon / app.cpp
index e04d27946cc7a21ef06f892782fcb1f8ce409e87..4f1c4734653230995412da2a80d27b63c95ca0e7 100644 (file)
@@ -1540,8 +1540,18 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
             int command = ancestor->GetAcceleratorTable()->GetCommand( event );
             if (command != -1)
             {
+                wxEvtHandler * const handler = ancestor->GetEventHandler();
+
                 wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
-                handled = ancestor->GetEventHandler()->ProcessEvent( command_event );
+                handled = handler->ProcessEvent( command_event );
+
+                if ( !handled )
+                {
+                    // accelerators can also be used with buttons, try them too
+                    command_event.SetEventType(wxEVT_COMMAND_BUTTON_CLICKED);
+                    handled = handler->ProcessEvent( command_event );
+                }
+
                 break;
             }