]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
1. MSW message handling simplifications
[wxWidgets.git] / src / msw / app.cpp
index 2ca841caa52b4092e38b7744bf2c9637153100f2..ac660f8e3f1603a5bcc67677ac8eb2360fcaba2b 100644 (file)
@@ -914,11 +914,6 @@ int wxApp::MainLoop()
 
 
         DoMessage();
-
-       // If they are pending events, we must process them.
-#if wxUSE_THREADS
-       ProcessPendingEvents();
-#endif
     }
 
     return s_currentMsg.wParam;
@@ -1024,6 +1019,10 @@ void wxApp::OnIdle(wxIdleEvent& event)
         event.RequestMore(TRUE);
     }
 
+    // If they are pending events, we must process them.
+#if wxUSE_THREADS
+    ProcessPendingEvents();
+#endif
     s_inOnIdle = FALSE;
 }
 
@@ -1179,6 +1178,10 @@ bool wxYield()
         if ( !wxTheApp->DoMessage() )
             break;
     }
+    // If they are pending events, we must process them.
+#if wxUSE_THREADS
+    wxTheApp->ProcessPendingEvents();
+#endif
 
     return TRUE;
 }