From 3ee2aa1b22c65fe09e4145cf86bdd28831ef68b9 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 10 Apr 2018 22:20:10 +0200 Subject: container: Remove gtk_container_maybe_start_idle_sizer() Fold it into gtk_container_start_idle_sizer() --- gtk/gtkcontainer.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'gtk/gtkcontainer.c') diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 8beec75ca1..888d9d59d2 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -1590,7 +1590,7 @@ gtk_container_idle_sizer (GdkFrameClock *clock, if (!gtk_container_needs_idle_sizer (container)) { - _gtk_container_stop_idle_sizer (container); + gtk_container_stop_idle_sizer (container); } else { @@ -1599,7 +1599,7 @@ gtk_container_idle_sizer (GdkFrameClock *clock, } } -static void +void gtk_container_start_idle_sizer (GtkContainer *container) { GtkContainerPrivate *priv = gtk_container_get_instance_private (container); @@ -1608,6 +1608,9 @@ gtk_container_start_idle_sizer (GtkContainer *container) if (priv->resize_handler != 0) return; + if (!gtk_container_needs_idle_sizer (container)) + return; + clock = gtk_widget_get_frame_clock (GTK_WIDGET (container)); if (clock == NULL) return; @@ -1619,7 +1622,7 @@ gtk_container_start_idle_sizer (GtkContainer *container) } void -_gtk_container_stop_idle_sizer (GtkContainer *container) +gtk_container_stop_idle_sizer (GtkContainer *container) { GtkContainerPrivate *priv = gtk_container_get_instance_private (container); @@ -1631,13 +1634,6 @@ _gtk_container_stop_idle_sizer (GtkContainer *container) priv->resize_handler = 0; } -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) { @@ -1649,7 +1645,7 @@ _gtk_container_queue_restyle (GtkContainer *container) return; priv->restyle_pending = TRUE; - _gtk_container_maybe_start_idle_sizer (container); + gtk_container_start_idle_sizer (container); } void -- cgit v1.2.1