[gtk+/native-layout] Make GtkWindow use the generic smallest size for the requisition again



commit b30445c9276089af39736e2eb2cb7b60ee590aaa
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Apr 17 22:51:35 2010 -0400

    Make GtkWindow use the generic smallest size for the requisition again

 gtk/gtkwindow.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index eea412e..388bfa7 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4949,18 +4949,17 @@ gtk_window_size_request (GtkWidget      *widget,
 
   if (bin->child && gtk_widget_get_visible (bin->child))
     {
-      gint width, height;
-      
-      /* XXX Use the minimum width for the natural height; even if its an hbox. 
+      /* Use the minimum width for the natural height; even if its an hbox. 
        *
        * This doesnt need to be here; naturally it will use the preference of the child
        * except for testing purposes its more interesting this way.
        */
-      gtk_extended_layout_get_desired_height (GTK_EXTENDED_LAYOUT (bin->child), NULL, &height);
-      gtk_extended_layout_get_width_for_height (GTK_EXTENDED_LAYOUT (bin->child), height, &width, NULL);
+      GtkRequisition child_req;
+
+      gtk_extended_layout_get_desired_size (GTK_EXTENDED_LAYOUT (bin->child), &child_req, NULL);
 
-      requisition->width += width;
-      requisition->height += height;
+      requisition->width  += child_req.width;
+      requisition->height += child_req.height;
     }
 }
 



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