From 9cfda3ca4d2ff7a5c7365bea7a16c6a541852a27 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 15 Aug 2015 11:04:20 -0700 Subject: [PATCH] IsShown() now returns false for non-selected wxNotebook pages, see #4343 --- include/wx/gtk/window.h | 1 + src/gtk/window.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 871fce13ea..bfaa707cae 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -64,6 +64,7 @@ public: virtual void Lower() wxOVERRIDE; virtual bool Show( bool show = true ) wxOVERRIDE; + virtual bool IsShown() const wxOVERRIDE; virtual bool IsRetained() const wxOVERRIDE; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index f0469d8359..94849d880f 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3329,6 +3329,12 @@ bool wxWindowGTK::Show( bool show ) return true; } +bool wxWindowGTK::IsShown() const +{ + // return false for non-selected wxNotebook pages + return m_isShown && (m_widget == NULL || gtk_widget_get_child_visible(m_widget)); +} + void wxWindowGTK::DoEnable( bool enable ) { wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );