From 3df94fe0994b090bbbf8d29ad4032248817be4fc Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 10 Apr 2018 22:07:36 +0200 Subject: [PATCH] container: Use maybe_start_idle_sizer() That way, we don't accidentally start an idle sizer for unrealized widgets. --- gtk/gtkcontainer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 460e99b9d3..cedde1ec34 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -1646,6 +1646,13 @@ gtk_container_queue_resize_handler (GtkContainer *container) } } +void +_gtk_container_maybe_start_idle_sizer (GtkContainer *container) +{ + if (gtk_container_needs_idle_sizer (container)) + gtk_container_start_idle_sizer (container); +} + void _gtk_container_queue_restyle (GtkContainer *container) { @@ -1656,15 +1663,8 @@ _gtk_container_queue_restyle (GtkContainer *container) if (priv->restyle_pending) return; - gtk_container_start_idle_sizer (container); priv->restyle_pending = TRUE; -} - -void -_gtk_container_maybe_start_idle_sizer (GtkContainer *container) -{ - if (gtk_container_needs_idle_sizer (container)) - gtk_container_start_idle_sizer (container); + _gtk_container_maybe_start_idle_sizer (container); } void