summaryrefslogtreecommitdiff
path: root/gtk/gtktextview.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-06-07 21:48:35 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-06-08 06:56:12 -0400
commit0a2b1b68fabba32add0cb95f2aa5c05539f935c5 (patch)
tree9d45a8e3627d31db2d73a3d2e313a675651df3ca /gtk/gtktextview.c
parent76836dcd813927abb404d61ad6d0a027ff7fc7de (diff)
downloadgtk+-0a2b1b68fabba32add0cb95f2aa5c05539f935c5.tar.gz
text view: Always clear handles for mouse interaction
There were some cases where we left a handle visible during mouse interaction, which is a little weird.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r--gtk/gtktextview.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 62dbf635b6..b1f4b47edd 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5234,7 +5234,8 @@ gtk_text_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
*/
GtkTextIter start, end;
- handle_mode = GTK_TEXT_HANDLE_MODE_CURSOR;
+ if (is_touchscreen)
+ handle_mode = GTK_TEXT_HANDLE_MODE_CURSOR;
get_iter_from_gesture (text_view, priv->multipress_gesture,
&iter, NULL, NULL);
@@ -5277,9 +5278,10 @@ gtk_text_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
case 2:
case 3:
if (is_touchscreen)
- break;
-
- handle_mode = GTK_TEXT_HANDLE_MODE_SELECTION;
+ {
+ handle_mode = GTK_TEXT_HANDLE_MODE_SELECTION;
+ break;
+ }
gtk_text_view_end_selection_drag (text_view);
get_iter_from_gesture (text_view, priv->multipress_gesture,
@@ -5292,11 +5294,8 @@ gtk_text_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
break;
}
- if (is_touchscreen)
- {
- _gtk_text_view_ensure_text_handles (text_view);
- gtk_text_view_update_handles (text_view, handle_mode);
- }
+ _gtk_text_view_ensure_text_handles (text_view);
+ gtk_text_view_update_handles (text_view, handle_mode);
}
if (n_press >= 3)