X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe593cc504195a3c91281eae4edf5e852a51a59c..259858fc6a55dd1f611dbec323264fdbad8b44fb:/src/gtk1/evtloop.cpp?ds=inline diff --git a/src/gtk1/evtloop.cpp b/src/gtk1/evtloop.cpp index 429de81069..d684ccb0eb 100644 --- a/src/gtk1/evtloop.cpp +++ b/src/gtk1/evtloop.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "evtloop.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -60,8 +56,6 @@ private: // wxEventLoop running and exiting // ---------------------------------------------------------------------------- -wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL; - wxEventLoop::~wxEventLoop() { wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") ); @@ -72,8 +66,7 @@ int wxEventLoop::Run() // event loops are not recursive, you need to create another loop! wxCHECK_MSG( !IsRunning(), -1, _T("can't reenter a message loop") ); - wxEventLoop *oldLoop = ms_activeLoop; - ms_activeLoop = this; + wxEventLoopActivator activate(this); m_impl = new wxEventLoopImpl; @@ -83,8 +76,6 @@ int wxEventLoop::Run() delete m_impl; m_impl = NULL; - ms_activeLoop = oldLoop; - return exitcode; } @@ -101,16 +92,13 @@ void wxEventLoop::Exit(int rc) // wxEventLoop message processing dispatching // ---------------------------------------------------------------------------- -extern bool g_isIdle; - bool wxEventLoop::Pending() const { - if (wxTheApp && !g_isIdle) + if (wxTheApp) { // We need to remove idle callbacks or gtk_events_pending will // never return false. wxTheApp->RemoveIdleTag(); - g_isIdle = TRUE; } return gtk_events_pending();