[gtk+/gestures: 83/117] entry: Don't show text handles too eagerly on button press
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures: 83/117] entry: Don't show text handles too eagerly on button press
- Date: Thu, 10 Apr 2014 20:31:40 +0000 (UTC)
commit 07cd5f28e4672f74f98864444357a0724f2e1c76
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Apr 8 21:15:06 2014 +0200
entry: Don't show text handles too eagerly on button press
Instead do so on button release, or after text selection dragging
starts.
gtk/gtkentry.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index dc9756f..250e489 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -4293,6 +4293,9 @@ gtk_entry_button_press (GtkWidget *widget,
is_touchscreen = test_touchscreen ||
gdk_device_get_source (source) == GDK_SOURCE_TOUCHSCREEN;
+ if (is_touchscreen)
+ gtk_entry_ensure_text_handles (entry);
+
priv->select_words = FALSE;
priv->select_lines = FALSE;
@@ -4372,12 +4375,8 @@ gtk_entry_button_press (GtkWidget *widget,
else
{
gtk_editable_set_position (editable, tmp_pos);
-
if (is_touchscreen)
- {
- gtk_entry_ensure_text_handles (entry);
- gtk_entry_update_handles (entry, GTK_TEXT_HANDLE_MODE_CURSOR);
- }
+ gtk_entry_update_handles (entry, GTK_TEXT_HANDLE_MODE_NONE);
}
break;
@@ -4489,6 +4488,7 @@ gtk_entry_button_release (GtkWidget *widget,
}
else if (is_touchscreen)
{
+ gtk_entry_update_handles (entry, GTK_TEXT_HANDLE_MODE_CURSOR);
gtk_entry_selection_bubble_popup_set (entry);
if (priv->magnifier_popover)
gtk_widget_hide (priv->magnifier_popover);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]