// Created: 01.11.02
// RCS-ID: $Id$
// Copyright: (c) 2002 Mattia Barbon
-// License: wxWindows license
+// License: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/evtloop.h"
#include "wx/event.h"
#include "wx/app.h"
+#include "wx/window.h"
#ifdef __VMS__
#pragma message disable nosimpint
ProcessXEvent( &event );
}
else
- XtAppProcessEvent( context, XtIMTimer|XtIMAlternateInput|XtIMSignal );
+#ifdef __VMS
+ XtAppProcessEvent( context, XtIMTimer|XtIMAlternateInput );
+#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;
static void wxBreakDispatch()
{
- char dummy;
+ char dummy = 0; // for valgrind
// check if wxWakeUpIdle has already been called
fd_set in;