X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/127eab18f80e5b298b8c0326609ed811035e6829..588f410058fc3d867c6e7ae3a19540fc1343c53f:/src/mgl/evtloop.cpp diff --git a/src/mgl/evtloop.cpp b/src/mgl/evtloop.cpp index 688430aee1..076009f6d4 100644 --- a/src/mgl/evtloop.cpp +++ b/src/mgl/evtloop.cpp @@ -22,10 +22,10 @@ #include "wx/window.h" #include "wx/app.h" #include "wx/thread.h" + #include "wx/timer.h" #endif //WX_PRECOMP #include "wx/evtloop.h" -#include "wx/timer.h" #include "wx/mgl/private.h" // ---------------------------------------------------------------------------- @@ -104,8 +104,6 @@ bool wxEventLoopImpl::SendIdleEvent() // wxEventLoop running and exiting // ---------------------------------------------------------------------------- -wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL; - wxEventLoop::~wxEventLoop() { wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") ); @@ -118,8 +116,7 @@ int wxEventLoop::Run() m_impl = new wxEventLoopImpl; - wxEventLoop *oldLoop = ms_activeLoop; - ms_activeLoop = this; + wxEventLoopActivator activate(this); for ( ;; ) { @@ -144,8 +141,6 @@ int wxEventLoop::Run() delete m_impl; m_impl = NULL; - ms_activeLoop = oldLoop; - return exitcode; }