[gtk/wip/exalm/consumes-motion: 3/6] entry: Claim sequence on release instead of press for icons




commit 3f4bad003f0afe7330576a3fa2c44d6712e1d514
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Dec 26 02:13:01 2020 +0500

    entry: Claim sequence on release instead of press for icons
    
    Make it possible to drag windows from entry icons in future.

 gtk/gtkentry.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 2626a2ffc7..acb2774481 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -1563,8 +1563,6 @@ icon_pressed_cb (GtkGestureClick *gesture,
 
   if (!icon_info->nonactivatable)
     g_signal_emit (entry, signals[ICON_PRESS], 0, pos);
-
-  gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
 }
 
 static void
@@ -1578,6 +1576,8 @@ icon_released_cb (GtkGestureClick *gesture,
   GtkEntryIconPosition pos;
   EntryIconInfo *icon_info;
 
+  gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
+
   pos = get_icon_position_from_controller (entry, GTK_EVENT_CONTROLLER (gesture));
   icon_info = priv->icons[pos];
 


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