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") );