]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
corrected getting FSRef associated with the POSIX path in wxString
[wxWidgets.git] / src / common / utilscmn.cpp
index 2cc90ec0e968d727d48817f5402441fda0447f19..ee22bc1b48f1437902896fb6c76fffac7f93899c 100644 (file)
@@ -872,11 +872,15 @@ wxWindowDisabler::~wxWindowDisabler()
 
 // Yield to other apps/messages and disable user input to all windows except
 // the given one
-bool wxSafeYield(wxWindow *win)
+bool wxSafeYield(wxWindow *win, bool onlyIfNeeded)
 {
     wxWindowDisabler wd(win);
 
-    bool rc = wxYield();
+    bool rc;
+    if (onlyIfNeeded)
+        rc = wxYieldIfNeeded();
+    else
+        rc = wxYield();
 
     return rc;
 }
@@ -900,13 +904,13 @@ bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
 const wxChar *wxGetInstallPrefix()
 {
     wxString prefix;
-    
+
     if ( wxGetEnv(wxT("WXPREFIX"), &prefix) )
         return prefix.c_str();
-    
+
 #ifdef wxINSTALL_PREFIX
     return wxT(wxINSTALL_PREFIX);
-#else 
+#else
     return wxT("");
 #endif
 }