]> Pileus Git - ~andy/gtk/commitdiff
GtkApplicationWindow: another size allocation fix
authorMatthias Clasen <mclasen@redhat.com>
Sun, 15 Jan 2012 00:48:40 +0000 (19:48 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 15 Jan 2012 01:35:19 +0000 (20:35 -0500)
Set the window allocation before giving allocations to children,
in case the children want to refer to the window allocation.

gtk/gtkapplicationwindow.c

index 3bf318f3bc535c7a270fd079b0da57fbefec636b..555db917c5258bbf915923ef38e9c07661cebee9 100644 (file)
@@ -635,6 +635,8 @@ gtk_application_window_real_size_allocate (GtkWidget     *widget,
       gint menubar_height;
       GtkWidget *child;
 
+      gtk_widget_set_allocation (widget, allocation);
+
       gtk_widget_get_preferred_height_for_width (window->priv->menubar, allocation->width, &menubar_height, NULL);
 
       menubar_allocation.height = menubar_height;
@@ -654,8 +656,6 @@ gtk_application_window_real_size_allocate (GtkWidget     *widget,
 
           gtk_widget_size_allocate (child, &child_allocation);
         }
-
-      gtk_widget_set_allocation (widget, allocation);
     }
   else
     GTK_WIDGET_CLASS (gtk_application_window_parent_class)