]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/evtloop.cpp
wxFileModificationTime return -1, not 0, on error (patch 1624484)
[wxWidgets.git] / src / dfb / evtloop.cpp
index 30ed0b7259343d335ce0b0058d561f8884848cb5..2ecc94a9b4212a7fd3fd0792349df235cdc6e6d7 100644 (file)
@@ -86,9 +86,6 @@ bool wxEventLoop::Dispatch()
     // NB: we don't block indefinitely waiting for an event, but instead
     //     time out after a brief period in order to make sure that
     //     OnNextIteration() will be called frequently enough
     // NB: we don't block indefinitely waiting for an event, but instead
     //     time out after a brief period in order to make sure that
     //     OnNextIteration() will be called frequently enough
-    //
-    //     FIXME: call NotifyTimers() and wxSocketEventDispatcher::RunLoop() from here
-    //            (and loop) instead?
     const int TIMEOUT = 100;
 
     if ( ms_buffer->WaitForEventWithTimeout(0, TIMEOUT) )
     const int TIMEOUT = 100;
 
     if ( ms_buffer->WaitForEventWithTimeout(0, TIMEOUT) )
@@ -127,8 +124,6 @@ void wxEventLoop::WakeUp()
 
 void wxEventLoop::OnNextIteration()
 {
 
 void wxEventLoop::OnNextIteration()
 {
-    // see the comment in Dispatch
-
 #if wxUSE_TIMER
     wxTimer::NotifyTimers();
 #endif
 #if wxUSE_TIMER
     wxTimer::NotifyTimers();
 #endif
@@ -139,6 +134,16 @@ void wxEventLoop::OnNextIteration()
 #endif
 }
 
 #endif
 }
 
+void wxEventLoop::Yield()
+{
+    // process all pending events:
+    while ( Pending() )
+        Dispatch();
+
+    // handle timers, sockets etc.
+    OnNextIteration();
+}
+
 
 //-----------------------------------------------------------------------------
 // DirectFB -> wxWidgets events translation
 
 //-----------------------------------------------------------------------------
 // DirectFB -> wxWidgets events translation