are anabled. Now the ode should be equivalent to the 2.4 event loop.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19223
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#else
XtAppProcessEvent( context, XtIMTimer|XtIMAlternateInput|XtIMSignal );
#endif
#else
XtAppProcessEvent( context, XtIMTimer|XtIMAlternateInput|XtIMSignal );
#endif
return m_impl ? m_impl->GetKeepGoing() : true;
}
return m_impl ? m_impl->GetKeepGoing() : true;
}
bool wxDoEventLoopIteration( wxEventLoop& evtLoop )
{
bool wxDoEventLoopIteration( wxEventLoop& evtLoop )
{
+ bool moreRequested, pendingEvents;
+
+ for(;;)
+ {
+ pendingEvents = evtLoop.Pending();
+ if( pendingEvents ) break;
+ moreRequested = ::SendIdleMessage();
+ if( !moreRequested ) break;
+ }
+
- // leave the main loop to give other threads a chance to
- // perform their GUI work
- wxMutexGuiLeave();
- wxUsleep(20);
- wxMutexGuiEnter();
+ if( !pendingEvents && !moreRequested )
+ {
+ // leave the main loop to give other threads a chance to
+ // perform their GUI work
+ wxMutexGuiLeave();
+ wxUsleep(20);
+ wxMutexGuiEnter();
+ }
- while ( !evtLoop.Pending() && ::SendIdleMessage() )
- ;
-
if( !evtLoop.Dispatch() )
return false;
if( !evtLoop.Dispatch() )
return false;