Merge branch 'wip/carlosg/flowbox-late-claim' into 'gtk-3-24'

flowbox: Accept multipress gesture late

See merge request GNOME/gtk!480
This commit is contained in:
Matthias Clasen 2019-01-07 20:26:23 +00:00
commit db4bd97732

View File

@ -3032,13 +3032,16 @@ gtk_flow_box_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
if (n_press != 1)
gtk_gesture_set_state (priv->drag_gesture, GTK_EVENT_SEQUENCE_DENIED);
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
priv->active_child = child;
priv->active_child_active = TRUE;
gtk_widget_queue_draw (GTK_WIDGET (box));
if (n_press == 2 && !priv->activate_on_single_click)
g_signal_emit (box, signals[CHILD_ACTIVATED], 0, child);
{
gtk_gesture_set_state (GTK_GESTURE (gesture),
GTK_EVENT_SEQUENCE_CLAIMED);
g_signal_emit (box, signals[CHILD_ACTIVATED], 0, child);
}
}
static void
@ -3052,6 +3055,9 @@ gtk_flow_box_multipress_gesture_released (GtkGestureMultiPress *gesture,
if (priv->active_child != NULL && priv->active_child_active)
{
gtk_gesture_set_state (GTK_GESTURE (gesture),
GTK_EVENT_SEQUENCE_CLAIMED);
if (priv->activate_on_single_click)
gtk_flow_box_select_and_activate (box, priv->active_child);
else