X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e933b5bc365e0907a4f0fd15b4c49e4c96c2b59f..3b69b47ca6e1a595bd357f849d46b10d98444fce:/src/motif/evtloop.cpp diff --git a/src/motif/evtloop.cpp b/src/motif/evtloop.cpp index 205496ca05..424b96c5ab 100644 --- a/src/motif/evtloop.cpp +++ b/src/motif/evtloop.cpp @@ -96,8 +96,6 @@ bool wxEventLoopImpl::SendIdleMessage() // wxEventLoop running and exiting // ---------------------------------------------------------------------------- -wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL; - wxEventLoop::~wxEventLoop() { wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") ); @@ -108,8 +106,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; m_impl->SetKeepGoing( true ); @@ -124,8 +121,6 @@ int wxEventLoop::Run() delete m_impl; m_impl = NULL; - ms_activeLoop = oldLoop; - return exitcode; }