summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-08-23 15:28:27 +0200
committerCarlos Garnacho <carlosg@gnome.org>2021-08-23 15:28:27 +0200
commit8f397502df322c2f4726c996b3c7640cd3e50b34 (patch)
tree4a045c76f41d380ba7b7f6c9e4719a6b16e49fd0
parent1310bf02189e404be96bdb5d38cf62bfa4da23eb (diff)
downloadgtk+-8f397502df322c2f4726c996b3c7640cd3e50b34.tar.gz
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.
-rw-r--r--gtk/gtktext.c2
1 files changed, 2 insertions, 0 deletions
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;