summaryrefslogtreecommitdiff
path: root/gtk/gtksizegroup.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-09-15 22:11:35 +0200
committerBenjamin Otte <otte@redhat.com>2015-10-28 19:44:27 +0100
commitdd0e5cfce691955d46c44d2cb286ab335ddec5d0 (patch)
treee2b8d18a35ab68b6c661aece1546607d30e7201d /gtk/gtksizegroup.c
parent8fea3b02c93c5243e7cb7f352b0ae9e2b6d2414f (diff)
downloadgtk+-dd0e5cfce691955d46c44d2cb286ab335ddec5d0.tar.gz
sizegroup: Remove special case before loop
The loop actually does the right thing already. There's no need to complicate things.
Diffstat (limited to 'gtk/gtksizegroup.c')
-rw-r--r--gtk/gtksizegroup.c37
1 files changed, 11 insertions, 26 deletions
diff --git a/gtk/gtksizegroup.c b/gtk/gtksizegroup.c
index 798b57133e..a0167ec064 100644
--- a/gtk/gtksizegroup.c
+++ b/gtk/gtksizegroup.c
@@ -206,37 +206,22 @@ _gtk_size_group_get_widget_peers (GtkWidget *for_widget,
static void
real_queue_resize (GtkWidget *widget)
{
- GtkWidget *container;
-
- _gtk_widget_set_alloc_needed (widget, TRUE);
- _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
-
- container = _gtk_widget_get_parent (widget);
- if (!container &&
- _gtk_widget_is_toplevel (widget) && GTK_IS_CONTAINER (widget))
- container = widget;
-
- if (container)
+ do
{
- widget = container;
+ _gtk_widget_set_alloc_needed (widget, TRUE);
+ _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
- do
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+ if (GTK_IS_RESIZE_CONTAINER (widget))
{
- _gtk_widget_set_alloc_needed (widget, TRUE);
- _gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- if (GTK_IS_RESIZE_CONTAINER (widget))
- {
- gtk_container_queue_resize_handler (GTK_CONTAINER (widget));
- break;
- }
- G_GNUC_END_IGNORE_DEPRECATIONS;
-
- widget = gtk_widget_get_parent (widget);
+ gtk_container_queue_resize_handler (GTK_CONTAINER (widget));
+ break;
}
- while (widget);
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
+ widget = gtk_widget_get_parent (widget);
}
+ while (widget);
}
static void