]> git.saurik.com Git - wxWidgets.git/commitdiff
also a dialog needs the current events set up correctly
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 26 Feb 2012 13:30:55 +0000 (13:30 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 26 Feb 2012 13:30:55 +0000 (13:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/nonownedwnd.mm

index 6413556029bf69b0abc340f410919e21f6f17eb6..81ecf321aa53dfa9a173cc6cbb2b7c8bb439a30b 100644 (file)
@@ -267,7 +267,18 @@ bool shouldHandleSelector(SEL selector)
 - (void)sendEvent:(NSEvent *) event
 {
     if ( ![self WX_filterSendEvent: event] )
+    {
+        WXEVENTREF formerEvent = wxTheApp == NULL ? NULL : wxTheApp->MacGetCurrentEvent();
+        WXEVENTHANDLERCALLREF formerHandler = wxTheApp == NULL ? NULL : wxTheApp->MacGetCurrentEventHandlerCallRef();
+        
+        if (wxTheApp)
+            wxTheApp->MacSetCurrentEvent(event, NULL);
+        
         [super sendEvent: event];
+        
+        if (wxTheApp)
+            wxTheApp->MacSetCurrentEvent(formerEvent , formerHandler);
+    }
 }
 
 @end