[gtk+/touch-selection-improvements] textview: Do not unset edition popover visibility on drag end



commit d0d884dcd69275f6595799fda16f3b679d61ff4a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Nov 21 17:58:00 2014 +0100

    textview: Do not unset edition popover visibility on drag end
    
    The code here is only meant to show the popover after text selection has
    finished, there is no need to toggle it off here, plus it interacts with
    long presses.

 gtk/gtktextview.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 428ce6f..7cd2159 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -7187,10 +7187,8 @@ gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture,
     (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0 ||
     gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN;
 
-  if (clicked_in_selection && priv->selection_bubble &&
-      gtk_widget_get_visible (priv->selection_bubble))
-    gtk_text_view_selection_bubble_popup_unset (text_view);
-  else if (!clicked_in_selection && is_touchscreen)
+  if (!clicked_in_selection && is_touchscreen &&
+      (!priv->selection_bubble || !gtk_widget_get_visible (priv->selection_bubble)))
     gtk_text_view_selection_bubble_popup_set (text_view);
 
   if (!is_touchscreen && clicked_in_selection &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]