]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/app.cpp
compilation fix for old SDKs (VC6...) which don't define HDM_SETBITMAPMARGIN/Header_S...
[wxWidgets.git] / src / motif / app.cpp
index 6208995cd0df97d15d4c513b36dde0c6349f4555..6f85268d7515bea251e2dc755fb23f7b0ac91431 100644 (file)
@@ -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;
 }