diff --git a/include/wx/evtloop.h b/include/wx/evtloop.h index ee6759d5b3..24ea711ece 100644 --- a/include/wx/evtloop.h +++ b/include/wx/evtloop.h @@ -177,6 +177,9 @@ protected: // the pointer to currently active loop static wxEventLoopBase *ms_activeLoop; + // should we exit the loop? + bool m_shouldExit; + // YieldFor() helpers: bool m_isInsideYield; long m_eventsToProcessInsideYield; @@ -212,9 +215,6 @@ protected: // the loop exit code int m_exitcode; - // should we exit the loop? - bool m_shouldExit; - private: // process all already pending events and dispatch a new one (blocking // until it appears in the event queue if necessary) diff --git a/include/wx/osx/core/evtloop.h b/include/wx/osx/core/evtloop.h index a59a785a0e..85f2a6c991 100644 --- a/include/wx/osx/core/evtloop.h +++ b/include/wx/osx/core/evtloop.h @@ -80,9 +80,6 @@ protected: virtual void OSXDoRun(); virtual void OSXDoStop(); - // should we exit the loop? - bool m_shouldExit; - // the loop exit code int m_exitcode; diff --git a/src/common/evtloopcmn.cpp b/src/common/evtloopcmn.cpp index 99f2d78f3d..a9f7bfccf4 100644 --- a/src/common/evtloopcmn.cpp +++ b/src/common/evtloopcmn.cpp @@ -30,6 +30,8 @@ wxEventLoopBase *wxEventLoopBase::ms_activeLoop = NULL; wxEventLoopBase::wxEventLoopBase() { + m_shouldExit = false; + m_isInsideYield = false; m_eventsToProcessInsideYield = wxEVT_CATEGORY_ALL; } @@ -91,7 +93,6 @@ bool wxEventLoopBase::Yield(bool onlyIfNeeded) wxEventLoopManual::wxEventLoopManual() { m_exitcode = 0; - m_shouldExit = false; } bool wxEventLoopManual::ProcessEvents()