summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-04-12 02:40:43 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-04-12 02:40:43 +0000
commit3ad56a762f42306e24f02337a38eebdfed636bc9 (patch)
tree1b281a8ef12f5e3f758d03a66809ff5975e30d73
parent21a1a405554db32dc5e390e62d8f05e4c173f5eb (diff)
parent233e6622943688ed960d1c260d2b7462cd416850 (diff)
downloadgtk+-3ad56a762f42306e24f02337a38eebdfed636bc9.tar.gz
Merge branch 'grouped-toggle-fix' into 'master'
togglebutton: Fix expected group behavior See merge request GNOME/gtk!3425
-rw-r--r--gtk/gtktogglebutton.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 1e53a896c6..93ba0e7c07 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -199,6 +199,9 @@ gtk_toggle_button_clicked (GtkButton *button)
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
GtkToggleButtonPrivate *priv = gtk_toggle_button_get_instance_private (toggle_button);
+ if (priv->active && (priv->group_prev || priv->group_next))
+ return;
+
gtk_toggle_button_set_active (toggle_button, !priv->active);
}