]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/evtloop.cpp
implementing rollover and pressed image for bitmapbutton on osx_cocoa
[wxWidgets.git] / src / osx / carbon / evtloop.cpp
index 4278ced1965e83752ed66aefea4b39c7f715d8b3..cdfda0653dac13b3b2344724164b7e8dd70b71b8 100644 (file)
@@ -89,6 +89,8 @@ bool wxGUIEventLoop::Dispatch()
     switch (status)
     {
         case eventLoopTimedOutErr :
+            // process pending wx events before sending idle events
+            wxTheApp->ProcessPendingEvents();
             if ( wxTheApp->ProcessIdle() )
                 m_sleepTime = kEventDurationNoWait ;
             else
@@ -167,6 +169,10 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
     // OnUpdateUI() which is a nice (and desired) side effect)
     while ( ProcessIdle() ) {}
 
+    // if there are pending events, we must process them.
+    if (wxTheApp)
+        wxTheApp->ProcessPendingEvents();
+    
 #if wxUSE_LOG
     wxLog::Resume();
 #endif // wxUSE_LOG