#include "wx/stdpaths.h"
#include "wx/filename.h"
+#include "wx/evtloop.h"
#include "wx/os2/private.h"
//
bool wxApp::Yield(bool onlyIfNeeded)
{
- static bool s_inYield = false;
-
- if ( s_inYield )
+ if ( m_isInsideYield )
{
if ( !onlyIfNeeded )
{
//
wxLog::Suspend();
- s_inYield = true;
+ m_isInsideYield = true;
//
// We want to go back to the main message loop
// if we see a WM_QUIT. (?)
//
+ wxEventLoopGuarantor dummyLoopIfNeeded;
while (::WinPeekMsg(vHab, &vMsg, (HWND)NULL, 0, 0, PM_NOREMOVE) && vMsg.msg != WM_QUIT)
{
#if wxUSE_THREADS
if (!wxTheApp->Dispatch())
break;
}
+
//
// If they are pending events, we must process them.
//
wxTheApp->ProcessPendingEvents();
HandleSockets();
+
//
// Let the logs be flashed again
//
wxLog::Resume();
- s_inYield = false;
+ m_isInsideYield = false;
+
return true;
} // end of wxYield