[gtk+/wip/csd: 7/11] application-window: Respect allocation of any decorations



commit 5a633c34a102e523d23f475dd320b331ca6f4bf5
Author: Rob Bradford <rob linux intel com>
Date:   Fri Apr 13 17:16:55 2012 +0100

    application-window: Respect allocation of any decorations

 gtk/gtkapplicationwindow.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index f1af0e2..c4a26b0 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -701,12 +701,14 @@ gtk_application_window_real_size_allocate (GtkWidget     *widget,
 
   if (window->priv->menubar != NULL)
     {
-      GtkAllocation menubar_allocation = *allocation;
+      GtkAllocation menubar_allocation;
       gint menubar_height;
       GtkWidget *child;
 
+      /* Updates allocation to be the child allocation area for the window */
       _gtk_window_set_allocation (GTK_WINDOW (widget), allocation);
 
+      menubar_allocation = *allocation;
       gtk_widget_get_preferred_height_for_width (window->priv->menubar, allocation->width, &menubar_height, NULL);
 
       menubar_allocation.height = menubar_height;



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