]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/menu.cpp
make access for virtuals match base
[wxWidgets.git] / src / motif / menu.cpp
index 81ce9a4e004aca87d1445b3130d9ac408051f331..68eee40b912576df6d7ed11c7e7060e78bcc65fe 100644 (file)
@@ -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 = 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;
 }