X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/455f7c8205e5dc29d99026b158ae0a394dccc839..bcf324bebe65cd7ee49c139533ceea52dceb4b91:/src/motif/app.cpp?ds=inline diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 6208995cd0..11d8129d70 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -470,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 ) { @@ -484,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; }