X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..24fcd264a78a4e88dc6572ccce3513600496b25c:/src/palmos/evtloop.cpp diff --git a/src/palmos/evtloop.cpp b/src/palmos/evtloop.cpp index 3de13673dc..ec93249cbc 100644 --- a/src/palmos/evtloop.cpp +++ b/src/palmos/evtloop.cpp @@ -51,40 +51,10 @@ #include #include -// ---------------------------------------------------------------------------- -// helper class -// ---------------------------------------------------------------------------- - -// 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; -}; - // ============================================================================ // wxEventLoop implementation // ============================================================================ -wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL; - // ---------------------------------------------------------------------------- // ctor/dtor // ---------------------------------------------------------------------------- @@ -122,6 +92,8 @@ int wxEventLoop::Run() status_t error; EventType event; + wxEventLoopActivator activate(this); + do { wxTheApp && wxTheApp->ProcessIdle();