From: Matthias Clasen Date: Thu, 2 Jul 2015 01:02:57 +0000 (-0700) Subject: GtkSwitch: fix a reentry issue X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~24^2~9214 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1be338fd444f0cdea8dad030f0fb52b346054fcd;p=gtk4.git GtkSwitch: fix a reentry issue The introduction of state broke some users which relied on being able to set active in a notify::active handler. https://bugzilla.gnome.org/show_bug.cgi?id=751754 --- diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index a2b10e16fb..3a2f8e9b9b 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -1092,10 +1092,10 @@ gtk_switch_set_active (GtkSwitch *sw, else priv->handle_pos = 0.0; - g_object_notify_by_pspec (G_OBJECT (sw), switch_props[PROP_ACTIVE]); - g_signal_emit (sw, signals[STATE_SET], 0, is_active, &handled); + g_object_notify_by_pspec (G_OBJECT (sw), switch_props[PROP_ACTIVE]); + accessible = gtk_widget_get_accessible (GTK_WIDGET (sw)); atk_object_notify_state_change (accessible, ATK_STATE_CHECKED, priv->is_active);