container: Use maybe_start_idle_sizer()

That way, we don't accidentally start an idle sizer for unrealized
widgets.
This commit is contained in:
Benjamin Otte 2018-04-10 22:07:36 +02:00
parent e0415fccd7
commit 3df94fe099

View File

@ -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