X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/355b4d3de54b76db87439fa2142c7334a6e48f85..04bf2fb51514e3ec8631a1d8ea1f610fca851005:/src/motif/evtloop.cpp diff --git a/src/motif/evtloop.cpp b/src/motif/evtloop.cpp index f2edf7f43b..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; } @@ -410,7 +405,7 @@ private: DECLARE_DYNAMIC_CLASS(wxIdlePipeModule) }; -IMPLEMENT_DYNAMIC_CLASS(wxIdlePipeModule, wxModule); +IMPLEMENT_DYNAMIC_CLASS(wxIdlePipeModule, wxModule) static void wxInputCallback( XtPointer, int* fd, XtInputId* ) {