forked from AuroraMiddleware/gtk
flowbox: Accept multipress gesture late
So it's able to operate properly with the DnD gesture set by gtk_drag_source_set(). We usually just react on button release, that's the right time to claim the gesture. Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1557
This commit is contained in:
parent
dea38f0222
commit
c4949aef09
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user