From 671b125ba7bf97627400afb5fbf71eb643bfca80 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 27 Feb 2011 20:38:40 +0000 Subject: [PATCH] make sure 10.4 command-key events are routed via the wx-accelerator route as well, fixes #12373 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/window.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 3b200a4635..6902e3a68d 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -1020,8 +1020,12 @@ void wxWidgetCocoaImpl::insertText(NSString* text, WXWidget slf, void *_cmd) bool wxWidgetCocoaImpl::performKeyEquivalent(WX_NSEvent event, WXWidget slf, void *_cmd) { - wxOSX_PerformKeyEventHandlerPtr superimpl = (wxOSX_PerformKeyEventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; - return superimpl(slf, (SEL)_cmd, event); + if ( GetFocusedViewInWindow([slf window]) != slf || m_hasEditor || !DoHandleKeyEvent(event) ) + { + wxOSX_PerformKeyEventHandlerPtr superimpl = (wxOSX_PerformKeyEventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; + return superimpl(slf, (SEL)_cmd, event); + } + return YES; } bool wxWidgetCocoaImpl::acceptsFirstResponder(WXWidget slf, void *_cmd)