X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/455f7c8205e5dc29d99026b158ae0a394dccc839..10b0f4894bcfc158dc406700365887da74ddbf15:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 6208995cd0..6f85268d75 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -472,9 +472,7 @@ void wxApp::SetTopLevelRealizedWidget(WXDisplay* display, WXWidget widget) bool wxApp::Yield(bool onlyIfNeeded) { - static bool s_inYield = false; - - if ( s_inYield ) + if ( m_isInsideYield ) { if ( !onlyIfNeeded ) { @@ -484,12 +482,13 @@ bool wxApp::Yield(bool onlyIfNeeded) return false; } - s_inYield = true; + m_isInsideYield = true; + wxEventLoopGuarantor dummyLoopIfNeeded; while (wxTheApp && wxTheApp->Pending()) wxTheApp->Dispatch(); - s_inYield = false; + m_isInsideYield = false; return true; }