return true from IsShownOnScreen() for TLWs even if their parent is hidden [backport of r50876 from trunk]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -891,12 +891,11 @@ bool wxWindowBase::Enable(bool enable)
|
|||||||
|
|
||||||
bool wxWindowBase::IsShownOnScreen() const
|
bool wxWindowBase::IsShownOnScreen() const
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
// A window is shown on screen if it itself is shown and so are all its
|
||||||
return ((wxWindowMac*)this)->MacIsReallyShown();
|
// parents. But if a window is toplevel one, then its always visible on
|
||||||
#else
|
// screen if IsShown() returns true, even if it has a hidden parent.
|
||||||
return IsShown() &&
|
return IsShown() &&
|
||||||
(GetParent() == NULL || GetParent()->IsShownOnScreen());
|
(IsTopLevel() || !GetParent() || GetParent()->IsShownOnScreen());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user