diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index b4103f2261..92eba14297 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -1560,7 +1560,19 @@ Returns {\tt true} if the window is shown, {\tt false} if it has been hidden. \wxheading{See also} -\helpref{wxWindow::IsVisible}{wxwindowisvisible} +\helpref{wxWindow::IsShownOnScreen}{wxwindowisshownonscreen} + + +\membersection{wxWindow::IsShownOnScreen}\label{wxwindowisshownonscreen} + +\constfunc{virtual bool}{IsShownOnScreen}{\void} + +Returns {\tt true} if the window is physically visible on the screen, i.e. it +is shown and all its parents up to the toplevel window are shown as well. + +\wxheading{See also} + +\helpref{wxWindow::IsShown}{wxwindowisshown} \membersection{wxWindow::IsTopLevel}\label{wxwindowistoplevel} @@ -1572,18 +1584,6 @@ dialogs are considered to be top-level windows (even if they have a parent window). -\membersection{wxWindow::IsVisible}\label{wxwindowisvisible} - -\constfunc{virtual bool}{IsVisible}{\void} - -Returns {\tt true} if the window is physically visible on the screen, i.e. it -is shown and all its parents up to the toplevel window are shown as well. - -\wxheading{See also} - -\helpref{wxWindow::IsShown}{wxwindowisshown} - - \membersection{wxWindow::Layout}\label{wxwindowlayout} \func{void}{Layout}{\void} diff --git a/include/wx/window.h b/include/wx/window.h index b752e7452f..9716f0e9f1 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -485,7 +485,7 @@ public: // returns true if the window is visible, i.e. IsShown() returns true // if called on it and all its parents up to the first TLW - virtual bool IsVisible() const; + virtual bool IsShownOnScreen() const; // get/set window style (setting style won't update the window and so // is only useful for internal usage) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 47983f7274..7d16c18b26 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -747,9 +747,10 @@ bool wxWindowBase::Enable(bool enable) } } -bool wxWindowBase::IsVisible() const +bool wxWindowBase::IsShownOnScreen() const { - return IsShown() && (GetParent() == NULL || GetParent()->IsVisible()); + return IsShown() && + (GetParent() == NULL || GetParent()->IsShownOnScreen()); } // ---------------------------------------------------------------------------- diff --git a/src/dfb/dcclient.cpp b/src/dfb/dcclient.cpp index 160f3e336d..d44190e4e3 100644 --- a/src/dfb/dcclient.cpp +++ b/src/dfb/dcclient.cpp @@ -58,7 +58,7 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect) wxPoint origin; wxIDirectFBSurfacePtr surface; - if ( !win->IsVisible() ) + if ( !win->IsShownOnScreen() ) { // we're painting on invisible window: the changes won't have any // effect, as the window will be repainted anyhow when it is shown, but @@ -117,7 +117,7 @@ wxWindowDC::~wxWindowDC() // painting on hidden window has no effect on TLW's surface, don't // waste time flipping the dummy surface: - if ( !m_win->IsVisible() ) + if ( !m_win->IsShownOnScreen() ) return; // if no painting was done on the DC, we don't have to flip the surface: