#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
-#endif //WX_PRECOMP
-
#include "wx/evtloop.h"
+#include "wx/app.h"
#include <gtk/gtk.h>
// wxEventLoop message processing dispatching
// ----------------------------------------------------------------------------
+extern bool g_isIdle;
+
bool wxEventLoop::Pending() const
{
- return gtk_events_pending() > 0;
+ if (wxTheApp && !g_isIdle)
+ {
+ // We need to remove idle callbacks or gtk_events_pending will
+ // never return false.
+ wxTheApp->RemoveIdleTag();
+ g_isIdle = TRUE;
+ }
+
+ return gtk_events_pending();
}
bool wxEventLoop::Dispatch()