[gtk+] paned: Move showing of the handle from realize() to map()



commit 6e3b4af3c5f9f3211a1fa4f5bcdf4c5ece195ec7
Author: Benjamin Otte <otte redhat com>
Date:   Thu Apr 28 20:27:40 2011 +0200

    paned: Move showing of the handle from realize() to map()
    
    Also only show the paned if it's actually supposed to be visible.

 gtk/gtkpaned.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index fad7b4a..62d515d 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -1185,10 +1185,6 @@ gtk_paned_realize (GtkWidget *widget)
   gdk_window_set_user_data (priv->handle, paned);
   if (attributes_mask & GDK_WA_CURSOR)
     g_object_unref (attributes.cursor);
-
-  if (priv->child1 && gtk_widget_get_visible (priv->child1) &&
-      priv->child2 && gtk_widget_get_visible (priv->child2))
-    gdk_window_show (priv->handle);
 }
 
 static void
@@ -1218,7 +1214,9 @@ gtk_paned_map (GtkWidget *widget)
   GtkPaned *paned = GTK_PANED (widget);
   GtkPanedPrivate *priv = paned->priv;
 
-  gdk_window_show (priv->handle);
+  if (priv->child1 && gtk_widget_get_visible (priv->child1) &&
+      priv->child2 && gtk_widget_get_visible (priv->child2))
+    gdk_window_show (priv->handle);
 
   GTK_WIDGET_CLASS (gtk_paned_parent_class)->map (widget);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]