#include "wx/window.h"
#include "wx/app.h"
#include "wx/thread.h"
+ #include "wx/timer.h"
#endif //WX_PRECOMP
#include "wx/evtloop.h"
-#include "wx/timer.h"
#include "wx/mgl/private.h"
// ----------------------------------------------------------------------------
// wxEventLoop running and exiting
// ----------------------------------------------------------------------------
-wxEventLoop *wxEventLoopBase::ms_activeLoop = NULL;
-
wxEventLoop::~wxEventLoop()
{
wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") );
m_impl = new wxEventLoopImpl;
- wxEventLoop *oldLoop = ms_activeLoop;
- ms_activeLoop = this;
+ wxEventLoopActivator activate(this);
for ( ;; )
{
delete m_impl;
m_impl = NULL;
- ms_activeLoop = oldLoop;
-
return exitcode;
}