X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ecf7346462b78a53defa2684aaac83dbfa29521..bcf324bebe65cd7ee49c139533ceea52dceb4b91:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index c987ef6334..11d8129d70 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -12,11 +12,6 @@ // 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 @@ -475,11 +470,9 @@ void wxApp::SetTopLevelRealizedWidget(WXDisplay* display, WXWidget widget) // 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 ) { @@ -489,12 +482,15 @@ bool wxApp::Yield(bool 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; }