From 09294e12fb454fa5a6b66b1ef031fee9cb43dd11 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 14 Dec 2007 23:56:07 +0000 Subject: [PATCH] compilation fix after HandleWindowEvent() changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/menu.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index ed09c4e47d..68eee40b91 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -162,17 +162,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 = HandleWindowEvent(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; }