summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-08-04 14:21:59 +0200
committerMatthias Clasen <mclasen@redhat.com>2014-08-04 14:36:42 +0200
commit007ba3bc14b690f32f269770ec6a52c7c6a561a5 (patch)
tree61ef1b435237c995ed3cdff7cb33abf21e5aa312
parent8820c46ff029b1355e8de777116e26e9b492e862 (diff)
downloadgtk+-007ba3bc14b690f32f269770ec6a52c7c6a561a5.tar.gz
GtkSwitch: End animation in set_active
End any running toggle animation before setting the set, otherwise things get confused.
-rw-r--r--gtk/gtkswitch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 915dc3899f..534dc5834a 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -160,7 +160,6 @@ gtk_switch_on_frame_clock_update (GdkFrameClock *clock,
}
else
{
- gtk_switch_end_toggle_animation (sw);
gtk_switch_set_active (sw, !priv->is_active);
priv->handle_x = priv->dest_offset;
}
@@ -1075,6 +1074,8 @@ gtk_switch_set_active (GtkSwitch *sw,
g_return_if_fail (GTK_IS_SWITCH (sw));
+ gtk_switch_end_toggle_animation (sw);
+
is_active = !!is_active;
priv = sw->priv;