[gtk/wip/exalm/consumes-motion: 2/6] checkbutton: Claim sequence on release instead of press




commit ec6e36e81377d02a1980e191b686595d20bc9a89
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Dec 25 15:59:38 2020 +0500

    checkbutton: Claim sequence on release instead of press
    
    Make it possible to drag windows from check buttons in future.

 gtk/gtkcheckbutton.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 953675765a..e32aaa41e8 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -276,8 +276,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
@@ -293,6 +291,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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]