]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/evtloop.mm
Initialize time zone information before using it in wxGetTimeZone().
[wxWidgets.git] / src / osx / cocoa / evtloop.mm
index ed35319658eb8af7a1682a4b722ba92c49bd641a..11e9d211296b72c4fbe181d032fd90410ddfb787 100644 (file)
@@ -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
     {