X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..28354d90fce9a6b1f8ccdf713602992fb5c7ccbb:/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();