X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/gtk1/evtloop.cpp diff --git a/src/gtk1/evtloop.cpp b/src/gtk1/evtloop.cpp index 9ff74e58c3..ac59d77edb 100644 --- a/src/gtk1/evtloop.cpp +++ b/src/gtk1/evtloop.cpp @@ -28,10 +28,8 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP -#endif //WX_PRECOMP - #include "wx/evtloop.h" +#include "wx/app.h" #include @@ -62,18 +60,13 @@ private: // wxEventLoop running and exiting // ---------------------------------------------------------------------------- -wxEventLoop *wxEventLoop::ms_activeLoop = NULL; +wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL; wxEventLoop::~wxEventLoop() { wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") ); } -bool wxEventLoop::IsRunning() const -{ - return m_impl != NULL; -} - int wxEventLoop::Run() { // event loops are not recursive, you need to create another loop! @@ -110,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()