forked from AuroraMiddleware/gtk
text view: Don't popup after drag selection
Don't show the touch selection popover after a selection drag ends. Instead, the popover will be triggered by an explicit touch on the selection.
This commit is contained in:
parent
aff47da950
commit
32be35010f
@ -7263,10 +7263,7 @@ gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture,
|
||||
|
||||
/* Check whether the drag was cancelled rather than finished */
|
||||
if (!gtk_gesture_handles_sequence (GTK_GESTURE (gesture), sequence))
|
||||
{
|
||||
gtk_text_view_selection_bubble_popup_unset (text_view);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
|
||||
device = gdk_event_get_source_device (event);
|
||||
@ -7274,10 +7271,6 @@ 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 && 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 &&
|
||||
!gtk_drag_check_threshold (GTK_WIDGET (text_view), start_x, start_y, x, y))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user