X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7934e44732bddea8e4c5491e8db17cd0326d5957..ff1e36afc063262750da38ca866784645be13520:/src/osx/cocoa/evtloop.mm?ds=sidebyside diff --git a/src/osx/cocoa/evtloop.mm b/src/osx/cocoa/evtloop.mm index ed35319658..11e9d21129 100644 --- a/src/osx/cocoa/evtloop.mm +++ b/src/osx/cocoa/evtloop.mm @@ -118,10 +118,16 @@ bool wxGUIEventLoop::Dispatch() inMode:NSDefaultRunLoopMode dequeue: YES]) { + WXEVENTREF formerEvent = wxTheApp == NULL ? NULL : wxTheApp->MacGetCurrentEvent(); + WXEVENTHANDLERCALLREF formerHandler = wxTheApp == NULL ? NULL : wxTheApp->MacGetCurrentEventHandlerCallRef(); + if (wxTheApp) wxTheApp->MacSetCurrentEvent(event, NULL); m_sleepTime = 0.0; [NSApp sendEvent: event]; + + if (wxTheApp) + wxTheApp->MacSetCurrentEvent(formerEvent , formerHandler); } else {