X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3754265e328a7cc7f67a46a9beea105cf1d49a14..646a8a4d0e965993411ae958ffbd6e7a7d87678c:/src/gtk/evtloop.cpp diff --git a/src/gtk/evtloop.cpp b/src/gtk/evtloop.cpp index acca1472fe..ac59d77edb 100644 --- a/src/gtk/evtloop.cpp +++ b/src/gtk/evtloop.cpp @@ -28,10 +28,8 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP -#endif //WX_PRECOMP - #include "wx/evtloop.h" +#include "wx/app.h" #include @@ -105,7 +103,14 @@ void wxEventLoop::Exit(int rc) bool wxEventLoop::Pending() const { - return gtk_events_pending() > 0; + if (wxTheApp) + { + // We need to remove idle callbacks or gtk_events_pending will + // never return false. + wxTheApp->RemoveIdleTag(); + } + + return gtk_events_pending(); } bool wxEventLoop::Dispatch()