// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#ifdef __VMS
-#define XtParent XTPARENT
-#define XtDisplay XTDISPLAY
-#endif
-
#include "wx/app.h"
#ifndef WX_PRECOMP
// Yield to other processes
-bool wxApp::Yield(bool onlyIfNeeded)
+bool wxApp::DoYield(bool onlyIfNeeded, long eventsToProcess)
{
- static bool s_inYield = false;
-
- if ( s_inYield )
+ if ( m_isInsideYield )
{
if ( !onlyIfNeeded )
{
return false;
}
- s_inYield = true;
+ m_isInsideYield = true;
+ m_eventsToProcessInsideYield = eventsToProcess;
+ wxEventLoopGuarantor dummyLoopIfNeeded;
while (wxTheApp && wxTheApp->Pending())
+ // TODO: implement event filtering using the eventsToProcess mask
wxTheApp->Dispatch();
- s_inYield = false;
+ m_isInsideYield = false;
return true;
}