[gtk+] text view: Always clear handles for mouse interaction
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] text view: Always clear handles for mouse interaction
- Date: Mon, 8 Jun 2015 10:58:54 +0000 (UTC)
commit 0a2b1b68fabba32add0cb95f2aa5c05539f935c5
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 7 21:48:35 2015 -0400
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.
gtk/gtktextview.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 62dbf63..b1f4b47 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]