X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/927f01da61023feace026942d369b4c5b80664da..bba35861478a26f5d8c756a9a7fa2bbd19a69cb1:/src/motif/menu.cpp diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index 81ce9a4e00..6eae7b96dd 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -33,8 +33,6 @@ #ifdef __VMS__ #pragma message disable nosimpint -#define XtDisplay XTDISPLAY -#define XtWindow XTWINDOW #endif #include #include @@ -162,17 +160,14 @@ void wxMenu::SetTitle(const wxString& label) bool wxMenu::ProcessCommand(wxCommandEvent & event) { - bool processed = false; + // Try the menu's event handler first + wxEvtHandler * const handler = GetEventHandler(); + bool processed = handler ? handler->SafelyProcessEvent(event) : false; - // Try the menu's event handler - if ( !processed && GetEventHandler()) - { - processed = GetEventHandler()->ProcessEvent(event); - } // Try the window the menu was popped up from (and up // through the hierarchy) if ( !processed && GetInvokingWindow()) - processed = GetInvokingWindow()->ProcessEvent(event); + processed = GetInvokingWindow()->HandleWindowEvent(event); return processed; }