]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/window.mm
Disable some wxWebView tests that fail on the buildbot but not locally.
[wxWidgets.git] / src / osx / cocoa / window.mm
index 0bf187240188e2410ee8a873c8b3a9666ad63359..3adaae15f40ef844c766f60accc17903b7d10d5d 100644 (file)
@@ -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 )
     {
     // 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;
     }
 
             return true;
     }