X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20bc5ad8dd419d0d3e524079f8fdbe3d8c14231f..4913272f9cdead94a6d1470e51d6fb14946b50e0:/src/palmos/evtloop.cpp diff --git a/src/palmos/evtloop.cpp b/src/palmos/evtloop.cpp index 8e981300d1..ec93249cbc 100644 --- a/src/palmos/evtloop.cpp +++ b/src/palmos/evtloop.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "evtloop.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -55,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 // ---------------------------------------------------------------------------- @@ -126,6 +92,8 @@ int wxEventLoop::Run() status_t error; EventType event; + wxEventLoopActivator activate(this); + do { wxTheApp && wxTheApp->ProcessIdle();