[gtk+/gestures: 169/202] entry: Ensure the cursor text handle is shown after touching to reposition cursor.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures: 169/202] entry: Ensure the cursor text handle is shown after touching to reposition cursor.
- Date: Fri, 23 May 2014 18:10:34 +0000 (UTC)
commit e70e3963dd01798f771432635274d6678d73a9da
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri May 16 17:46:12 2014 +0200
entry: Ensure the cursor text handle is shown after touching to reposition cursor.
gtk/gtkentry.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index ea10ff9..0d5f6d8 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4726,11 +4726,12 @@ gtk_entry_drag_gesture_end (GtkGestureDrag *gesture,
gint tmp_pos = gtk_entry_find_position (entry, priv->drag_start_x);
gtk_editable_set_position (GTK_EDITABLE (entry), tmp_pos);
-
- if (is_touchscreen)
- gtk_entry_update_handles (entry, GTK_TEXT_HANDLE_MODE_CURSOR);
}
+ if (is_touchscreen &&
+ !gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), NULL, NULL))
+ gtk_entry_update_handles (entry, GTK_TEXT_HANDLE_MODE_CURSOR);
+
gtk_entry_update_primary_selection (entry);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]