// Created: 01.11.02
// RCS-ID: $Id$
// Copyright: (c) 2002 Mattia Barbon
-// License: wxWindows license
+// License: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
#else
XtAppProcessEvent( context, XtIMTimer|XtIMAlternateInput|XtIMSignal );
#endif
-
+
return m_impl ? m_impl->GetKeepGoing() : true;
}
bool wxDoEventLoopIteration( wxEventLoop& evtLoop )
{
+ bool moreRequested, pendingEvents;
+
+ for(;;)
+ {
+ pendingEvents = evtLoop.Pending();
+ if( pendingEvents ) break;
+ moreRequested = ::SendIdleMessage();
+ if( !moreRequested ) break;
+ }
+
#if wxUSE_THREADS
- // 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();
+ }
#endif
- while ( !evtLoop.Pending() && ::SendIdleMessage() )
- ;
-
if( !evtLoop.Dispatch() )
return false;