summaryrefslogtreecommitdiff
path: root/gtk/gtkhandlebox.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-09-08 00:25:47 +0200
committerJavier Jardón <jjardon@gnome.org>2010-09-08 18:50:24 +0200
commit993400742041418637e1b09b462e311665ce00fb (patch)
tree1dbafa241869741844e5d98a1e3be563430521fe /gtk/gtkhandlebox.c
parent4e6a665e613fc7c65874bc5a121c7b87fe65b3e2 (diff)
downloadgtk+-993400742041418637e1b09b462e311665ce00fb.tar.gz
Completely removed requisition cache from GtkWidget instance structure.
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface; it makes no sense to maintain this cache on the GtkWidget structure... removing the requisition cache however does not break the old "size-request" signal which is there for backwards compatability reasons. In any case widget->requisition should not have been accessed, gtk_widget_get_child_requisition() would have been the correct way to consult the cache. This commit also deprecates the newly added gtk_widget_get_requisition() API and makes it fallback on gtk_size_request_get_size().
Diffstat (limited to 'gtk/gtkhandlebox.c')
-rw-r--r--gtk/gtkhandlebox.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index 3769b69568..add2d3b97a 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -32,6 +32,7 @@
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkwindow.h"
+#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
@@ -406,6 +407,7 @@ gtk_handle_box_realize (GtkWidget *widget)
GtkHandleBoxPrivate *priv = hb->priv;
GtkWidget *child;
GdkWindowAttr attributes;
+ GtkRequisition requisition;
gint attributes_mask;
gtk_widget_set_realized (widget, TRUE);
@@ -443,10 +445,12 @@ gtk_handle_box_realize (GtkWidget *widget)
if (child)
gtk_widget_set_parent_window (child, priv->bin_window);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (widget), &requisition, NULL);
+
attributes.x = 0;
attributes.y = 0;
- attributes.width = widget->requisition.width;
- attributes.height = widget->requisition.height;
+ attributes.width = requisition.width;
+ attributes.height = requisition.height;
attributes.window_type = GDK_WINDOW_TOPLEVEL;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);