[gtk/wip/carlosg/gesture-state-in-entries: 1/4] gtktext: Set claimed state on button1 click gesture




commit 8f397502df322c2f4726c996b3c7640cd3e50b34
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Aug 23 15:28:27 2021 +0200

    gtktext: Set claimed state on button1 click gesture
    
    All possible ramifications after button1 press (move cursor,
    begin drag, begin dnd, select word/line, ...) result in user
    actions. The right thing after that is consuming the events,
    set the gesture state for that.

 gtk/gtktext.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 52cbf56a09..43d8c52d62 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -2773,6 +2773,8 @@ gtk_text_click_gesture_pressed (GtkGestureClick *gesture,
       GdkDevice *source;
       guint state;
 
+      gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
+
       sel_start = priv->selection_bound;
       sel_end = priv->current_pos;
       have_selection = sel_start != sel_end;


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