Give wxSafeYield an onlyIfNeeded parameter

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-12-16 21:58:36 +00:00
parent 8325937efa
commit b829bf55a0
3 changed files with 30 additions and 26 deletions

View File

@@ -872,11 +872,14 @@ 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 = FALSE)
{
wxWindowDisabler wd(win);
bool rc = wxYield();
if (onlyIfNeeded)
bool rc = wxYieldIfNeeded();
else
bool rc = wxYield();
return rc;
}
@@ -900,13 +903,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
}