From 8a6a997fb0989a09a410eaa7962a96145c0a434e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 21 Dec 2007 13:53:41 +0000 Subject: [PATCH] toplevel window is shown on screen even if its parent is hidden git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index a417e77b60..dba13d8542 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -881,8 +881,11 @@ bool wxWindowBase::Enable(bool enable) bool wxWindowBase::IsShownOnScreen() const { + // A window is shown on screen if it itself is shown and so are all its + // parents. But if a window is toplevel one, then its always visible on + // screen if IsShown() returns true, even if it has a hidden parent. return IsShown() && - (GetParent() == NULL || GetParent()->IsShownOnScreen()); + (IsTopLevel() || GetParent() == NULL || GetParent()->IsShownOnScreen()); } // ----------------------------------------------------------------------------