[gtk+/wip/csd: 129/134] window: Refactor title allocation to use specific stack variable



commit f0c25b300f70576b40b6d3c5d193502ff37f1200
Author: Rob Bradford <rob linux intel com>
Date:   Thu Jan 31 12:07:03 2013 +0000

    window: Refactor title allocation to use specific stack variable

 gtk/gtkwindow.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index ed68e80..3fffbb9 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5675,17 +5675,22 @@ _gtk_window_set_allocation (GtkWindow     *window,
   gtk_widget_set_allocation (widget, allocation);
 
   border_width = gtk_container_get_border_width (GTK_CONTAINER (window));
+
   if (priv->title_box && gtk_widget_get_visual(priv->title_box))
     {
-      child_allocation.x = priv->title_border.left + priv->window_border.left;
-      child_allocation.y = priv->title_border.top + priv->window_border.top;
-      child_allocation.width =
+      GtkAllocation title_allocation;
+
+      title_allocation.x = priv->title_border.left +
+                           priv->window_border.left;
+      title_allocation.y = priv->title_border.top +
+                           priv->window_border.top;
+      title_allocation.width =
         MAX (1, (gint) allocation->width -
              priv->title_border.left - priv->title_border.right -
              priv->window_border.left - priv->window_border.right);
-      child_allocation.height = priv->title_height;
+      title_allocation.height = priv->title_height;
 
-      gtk_widget_size_allocate (priv->title_box, &child_allocation);
+      gtk_widget_size_allocate (priv->title_box, &title_allocation);
     }
 
   child_allocation.x = border_width + priv->window_border.left;


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