Commit 84bd32a0 authored by Matthias Clasen's avatar Matthias Clasen

popover: Optimize the transition

There's no need to queue a resize here.

https://bugzilla.gnome.org/show_bug.cgi?id=753568
parent 0455e565
......@@ -518,8 +518,6 @@ show_animate_cb (GtkWidget *widget,
gtk_widget_set_opacity (widget, 1.0 - t);
}
gtk_widget_queue_resize (GTK_WIDGET (popover));
if (t >= 1.0)
{
if (priv->state == STATE_SHOWING)
......@@ -532,10 +530,10 @@ show_animate_cb (GtkWidget *widget,
else
gtk_popover_set_state (popover, STATE_HIDDEN);
return FALSE;
return G_SOURCE_REMOVE;
}
else
return TRUE;
return G_SOURCE_CONTINUE;
}
static void
......@@ -575,7 +573,7 @@ gtk_popover_set_state (GtkPopover *popover,
gtk_popover_start_transition (popover);
else
{
if (priv->tick_id)
if (priv->tick_id != 0)
{
gtk_widget_remove_tick_callback (GTK_WIDGET (popover), priv->tick_id);
priv->tick_id = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment