From 3bcdbc3fb2d49994def60292ab54c7bf079bc3af Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 3 Dec 2022 11:16:50 +0100 Subject: [PATCH] label: Tweak selection behavior Arrange for double-click-followed-by-drag to do select by words, not select-and-dnd. This matches the behavior in GtkTextView better and feels intuitive. Fixes: #2024 --- gtk/gtklabel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 7933ab2af7..468ef2ae87 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -5222,7 +5222,8 @@ gtk_label_drag_gesture_begin (GtkGestureDrag *gesture, { if (min < max && min <= index && index <= max) { - info->in_drag = TRUE; + if (!info->select_words) + info->in_drag = TRUE; info->drag_start_x = start_x; info->drag_start_y = start_y; }