summaryrefslogtreecommitdiff
path: root/gtk/gtkcheckbutton.c
diff options
context:
space:
mode:
authorAlexander Mikhaylenko <alexm@gnome.org>2020-12-25 15:59:38 +0500
committerAlexander Mikhaylenko <alexm@gnome.org>2021-01-29 12:00:10 +0500
commitbf2620f041c0c621e6de11e8489d59ee9f4d4dca (patch)
tree9008005a5f3ab809fddf532506cfa8c88cdadaa0 /gtk/gtkcheckbutton.c
parent870b82b541d41449bbc5d90b7817d3ebbda5c715 (diff)
downloadgtk+-bf2620f041c0c621e6de11e8489d59ee9f4d4dca.tar.gz
checkbutton: Claim sequence on release instead of press
Make it possible to drag windows from check buttons in future.
Diffstat (limited to 'gtk/gtkcheckbutton.c')
-rw-r--r--gtk/gtkcheckbutton.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index afadecd841..0ce5d1ae0f 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -278,8 +278,6 @@ click_pressed_cb (GtkGestureClick *gesture,
{
if (gtk_widget_get_focus_on_click (widget) && !gtk_widget_has_focus (widget))
gtk_widget_grab_focus (widget);
-
- gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
}
static void
@@ -295,6 +293,8 @@ click_released_cb (GtkGestureClick *gesture,
if (priv->active && (priv->group_prev || priv->group_next))
return;
+ gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
+
gtk_check_button_set_active (self, !priv->active);
if (priv->action_helper)