[gtk+/touch-selection-improvements] textview: Unset selection popover on !touchscreen when clicking outside
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touch-selection-improvements] textview: Unset selection popover on !touchscreen when clicking outside
- Date: Thu, 18 Dec 2014 17:15:01 +0000 (UTC)
commit 9c466305530c554ee59c63d105a5f7f3fee2f9d0
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Dec 18 18:13:39 2014 +0100
textview: Unset selection popover on !touchscreen when clicking outside
The intent is hiding it on interaction from other than a touchscreen,
actually do that here.
gtk/gtktextview.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 06caa2f..3a1ef69 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5230,14 +5230,16 @@ gtk_text_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
}
break;
}
- else if (is_touchscreen)
- {
+ else
+ {
gtk_text_view_selection_bubble_popup_unset (text_view);
- gtk_text_buffer_place_cursor (get_buffer (text_view), &iter);
- }
- else
- gtk_text_view_start_selection_drag (text_view, &iter,
- SELECT_CHARACTERS, extends);
+
+ if (is_touchscreen)
+ gtk_text_buffer_place_cursor (get_buffer (text_view), &iter);
+ else
+ gtk_text_view_start_selection_drag (text_view, &iter,
+ SELECT_CHARACTERS, extends);
+ }
break;
}
case 2:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]