From 3c1a2c8d24cce22ebfa67a8ec4548c09e4e700d2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 7 Jun 2015 21:52:35 -0400 Subject: [PATCH] entry: Always clear handles for mouse interaction There were some cases where we left a handle visible during mouse interaction, which is a little weird. --- gtk/gtkentry.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 756176f9d8..c617a92a77 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -4536,12 +4536,14 @@ gtk_entry_multipress_gesture_pressed (GtkGestureMultiPress *gesture, case 2: priv->select_words = TRUE; gtk_entry_select_word (entry); - mode = GTK_TEXT_HANDLE_MODE_SELECTION; + if (is_touchscreen) + mode = GTK_TEXT_HANDLE_MODE_SELECTION; break; case 3: priv->select_lines = TRUE; gtk_entry_select_line (entry); - mode = GTK_TEXT_HANDLE_MODE_SELECTION; + if (is_touchscreen) + mode = GTK_TEXT_HANDLE_MODE_SELECTION; break; default: break; @@ -4572,8 +4574,7 @@ gtk_entry_multipress_gesture_pressed (GtkGestureMultiPress *gesture, gtk_gesture_set_state (priv->drag_gesture, GTK_EVENT_SEQUENCE_CLAIMED); - if (is_touchscreen) - gtk_entry_update_handles (entry, mode); + gtk_entry_update_handles (entry, mode); } if (n_press >= 3)