show window from PostCreation() (which is called for the derived classes as well...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 1 Apr 2004 13:08:24 +0000 (13:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 1 Apr 2004 13:08:24 +0000 (13:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index 525ef71e7eb5f4c3210b5215bc2bd91c0039a809..6a39ba448d575cc6910623871960ee55abc30379 100644 (file)
@@ -2732,9 +2732,6 @@ bool wxWindowGTK::Create( wxWindow *parent,
 
     PostCreation();
 
-    if ( IsShown() )
-        gtk_widget_show( m_widget );
-
     return TRUE;
 }
 
@@ -2919,6 +2916,11 @@ void wxWindowGTK::PostCreation()
     }
 
     m_hasVMT = TRUE;
+
+    // unless the window was created initially hidden (i.e. Hide() had been
+    // called before Create()), we should show it at GTK+ level as well
+    if ( IsShown() )
+        gtk_widget_show( m_widget );
 }
 
 void wxWindowGTK::ConnectWidget( GtkWidget *widget )
index 525ef71e7eb5f4c3210b5215bc2bd91c0039a809..6a39ba448d575cc6910623871960ee55abc30379 100644 (file)
@@ -2732,9 +2732,6 @@ bool wxWindowGTK::Create( wxWindow *parent,
 
     PostCreation();
 
-    if ( IsShown() )
-        gtk_widget_show( m_widget );
-
     return TRUE;
 }
 
@@ -2919,6 +2916,11 @@ void wxWindowGTK::PostCreation()
     }
 
     m_hasVMT = TRUE;
+
+    // unless the window was created initially hidden (i.e. Hide() had been
+    // called before Create()), we should show it at GTK+ level as well
+    if ( IsShown() )
+        gtk_widget_show( m_widget );
 }
 
 void wxWindowGTK::ConnectWidget( GtkWidget *widget )