summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-12-17 15:16:25 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-12-17 15:17:23 -0500
commit2e254076381d66a9f6cbaa4745ad33791a4f3734 (patch)
tree0b965c9e3da3e6a60a00112bae2fde8992b8c613
parentfab31e16ed57774f0b6dbd97bab682dd72c6957c (diff)
downloadgtk+-2e254076381d66a9f6cbaa4745ad33791a4f3734.tar.gz
Fix a problem with entry gadgets
place_windows is accessing the gadgets allocation, so make sure to allocate the gadget before calling it.
-rw-r--r--gtk/gtkentry.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 4b86e4104b..1a1a379530 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3777,6 +3777,13 @@ gtk_entry_size_allocate (GtkWidget *widget,
gtk_widget_set_allocation (widget, allocation);
+ gtk_css_gadget_allocate (entry->priv->gadget,
+ allocation,
+ gtk_widget_get_allocated_baseline (widget),
+ &clip);
+
+ gtk_widget_set_clip (widget, &clip);
+
if (gtk_widget_get_realized (widget))
{
GtkEntryCompletion *completion;
@@ -3788,13 +3795,6 @@ gtk_entry_size_allocate (GtkWidget *widget,
if (completion)
_gtk_entry_completion_resize_popup (completion);
}
-
- gtk_css_gadget_allocate (entry->priv->gadget,
- allocation,
- gtk_widget_get_allocated_baseline (widget),
- &clip);
-
- gtk_widget_set_clip (widget, &clip);
}
static void