X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e933b5bc365e0907a4f0fd15b4c49e4c96c2b59f..2713fedc4644942bab59472b90612ffbe37c2760:/src/motif/evtloop.cpp?ds=sidebyside diff --git a/src/motif/evtloop.cpp b/src/motif/evtloop.cpp index 205496ca05..4271f4577c 100644 --- a/src/motif/evtloop.cpp +++ b/src/motif/evtloop.cpp @@ -26,12 +26,12 @@ #include "wx/wxprec.h" #ifndef WX_PRECOMP + #include "wx/event.h" + #include "wx/app.h" + #include "wx/window.h" #endif //WX_PRECOMP #include "wx/evtloop.h" -#include "wx/event.h" -#include "wx/app.h" -#include "wx/window.h" #ifdef __VMS__ #pragma message disable nosimpint @@ -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; } @@ -482,4 +477,3 @@ bool wxAddIdleCallback() return true; } -