X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..aa78d22e2008726218d47da1f2ac5864c11b8ebb:/src/os2/evtloop.cpp?ds=sidebyside diff --git a/src/os2/evtloop.cpp b/src/os2/evtloop.cpp index 6d72bb674c..8ed9c42574 100644 --- a/src/os2/evtloop.cpp +++ b/src/os2/evtloop.cpp @@ -83,30 +83,6 @@ private: wxDEFINE_TIED_SCOPED_PTR_TYPE(wxEventLoopImpl); -// this object sets the wxEventLoop given to the ctor as the currently active -// one and unsets it in its dtor -class wxEventLoopActivator -{ -public: - wxEventLoopActivator(wxEventLoop **pActive, - wxEventLoop *evtLoop) - { - m_pActive = pActive; - m_evtLoopOld = *pActive; - *pActive = evtLoop; - } - - ~wxEventLoopActivator() - { - // restore the previously active event loop - *m_pActive = m_evtLoopOld; - } - -private: - wxEventLoop *m_evtLoopOld; - wxEventLoop **m_pActive; -}; - // ============================================================================ // wxEventLoopImpl implementation // ============================================================================ @@ -223,8 +199,6 @@ bool wxEventLoopImpl::SendIdleMessage() // wxEventLoop implementation // ============================================================================ -wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL; - // ---------------------------------------------------------------------------- // wxEventLoop running and exiting // ---------------------------------------------------------------------------- @@ -271,7 +245,7 @@ int wxEventLoop::Run() // SendIdleMessage() and Dispatch() below may throw so the code here should // be exception-safe, hence we must use local objects for all actions we // should undo - wxEventLoopActivator activate(&ms_activeLoop, this); + wxEventLoopActivator activate(this); wxEventLoopImplTiedPtr impl(&m_impl, new wxEventLoopImpl); CallEventLoopMethod callOnExit(this, &wxEventLoop::OnExit);