]> git.saurik.com Git - wxWidgets.git/commitdiff
made wxIsInsideYield global -- will be fixed when we have some better way to test...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 May 2002 11:25:39 +0000 (11:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 May 2002 11:25:39 +0000 (11:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/app.cpp
src/gtk1/app.cpp

index e3badff23723783c2ec63a11088ffb2a3bb57d2b..3f05639ce8b0e684d142e82b8fda3856af3861b5 100644 (file)
@@ -87,12 +87,14 @@ void wxExit()
 // wxYield
 //-----------------------------------------------------------------------------
 
+// not static because used by textctrl.cpp
+//
+// MT-FIXME
+bool wxIsInsideYield = FALSE;
+
 bool wxApp::Yield(bool onlyIfNeeded)
 {
-    // MT-FIXME
-    static bool s_inYield = FALSE;
-
-    if ( s_inYield )
+    if ( wxIsInsideYield )
     {
         if ( !onlyIfNeeded )
         {
@@ -110,7 +112,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
     }
 #endif // wxUSE_THREADS
 
-    s_inYield = TRUE;
+    wxIsInsideYield = TRUE;
 
     if (!g_isIdle)
     {
@@ -139,7 +141,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
     // let the logs be flashed again
     wxLog::Resume();
 
-    s_inYield = FALSE;
+    wxIsInsideYield = FALSE;
 
     return TRUE;
 }
index e3badff23723783c2ec63a11088ffb2a3bb57d2b..3f05639ce8b0e684d142e82b8fda3856af3861b5 100644 (file)
@@ -87,12 +87,14 @@ void wxExit()
 // wxYield
 //-----------------------------------------------------------------------------
 
+// not static because used by textctrl.cpp
+//
+// MT-FIXME
+bool wxIsInsideYield = FALSE;
+
 bool wxApp::Yield(bool onlyIfNeeded)
 {
-    // MT-FIXME
-    static bool s_inYield = FALSE;
-
-    if ( s_inYield )
+    if ( wxIsInsideYield )
     {
         if ( !onlyIfNeeded )
         {
@@ -110,7 +112,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
     }
 #endif // wxUSE_THREADS
 
-    s_inYield = TRUE;
+    wxIsInsideYield = TRUE;
 
     if (!g_isIdle)
     {
@@ -139,7 +141,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
     // let the logs be flashed again
     wxLog::Resume();
 
-    s_inYield = FALSE;
+    wxIsInsideYield = FALSE;
 
     return TRUE;
 }