X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edf5822ace25ff6283b05e587116e49e50b77464..8a31648287be0ef976f133de2786b137f1e98340:/src/osx/cocoa/window.mm diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 0bf1872401..3adaae15f4 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -2305,9 +2305,9 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event) // changed by SetupKeyEvent() so it can be wxEVT_KEY_UP too by now). if ( wxevent.GetEventType() == wxEVT_KEY_DOWN ) { - wxKeyEvent eventHook(wxevent); - eventHook.SetEventType(wxEVT_CHAR_HOOK); - if ( wxGetTopLevelParent(GetWXPeer())->OSXHandleKeyEvent(eventHook) ) + wxKeyEvent eventHook(wxEVT_CHAR_HOOK, wxevent); + if ( GetWXPeer()->OSXHandleKeyEvent(eventHook) + && !eventHook.IsNextEventAllowed() ) return true; }