diff --git a/include/wx/menu.h b/include/wx/menu.h index eb262bc2da..af9f2e7364 100644 --- a/include/wx/menu.h +++ b/include/wx/menu.h @@ -398,7 +398,7 @@ protected: static bool ms_locked; -private: +protected: // Common part of SendEvent() and ProcessMenuEvent(): sends the event to // its intended recipients, returns true if it was processed. static bool DoProcessEvent(wxMenuBase* menu, wxEvent& event, wxWindow* win); diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index e24ce81579..75251bc06a 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -326,23 +326,7 @@ bool wxMenu::HandleCommandUpdateStatus( wxMenuItem* item, wxWindow* senderWindow wxUpdateUIEvent event(menuid); event.SetEventObject( this ); - bool processed = false; - - // Try the menu's event handler - { - wxEvtHandler *handler = GetEventHandler(); - if ( handler ) - processed = handler->ProcessEvent(event); - } - - // Try the window the menu was popped up from - // (and up through the hierarchy) - if ( !processed ) - { - wxWindow *win = GetWindow(); - if ( win ) - processed = win->HandleWindowEvent(event); - } + bool processed = DoProcessEvent(this, event, GetWindow()); if ( !processed && senderWindow != NULL) {