forked from AuroraMiddleware/gtk
listitemwidget: Claim gesture when activating
Claim the gesture when we are activating a list item. Otherwise we end up with double activations in columnviews: first GtkColumnViewCell handles the event, and then GtkListItemWidget handles it again. Fixes: #4015
This commit is contained in:
parent
68eb422333
commit
276f85c9e3
@ -334,6 +334,7 @@ gtk_list_item_widget_click_gesture_pressed (GtkGestureClick *gesture,
|
|||||||
{
|
{
|
||||||
if (n_press == 2 && !priv->single_click_activate)
|
if (n_press == 2 && !priv->single_click_activate)
|
||||||
{
|
{
|
||||||
|
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
|
||||||
gtk_widget_activate_action (GTK_WIDGET (self),
|
gtk_widget_activate_action (GTK_WIDGET (self),
|
||||||
"list.activate-item",
|
"list.activate-item",
|
||||||
"u",
|
"u",
|
||||||
@ -360,6 +361,7 @@ gtk_list_item_widget_click_gesture_released (GtkGestureClick *gesture,
|
|||||||
{
|
{
|
||||||
if (n_press == 1 && priv->single_click_activate)
|
if (n_press == 1 && priv->single_click_activate)
|
||||||
{
|
{
|
||||||
|
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
|
||||||
gtk_widget_activate_action (GTK_WIDGET (self),
|
gtk_widget_activate_action (GTK_WIDGET (self),
|
||||||
"list.activate-item",
|
"list.activate-item",
|
||||||
"u",
|
"u",
|
||||||
|
Loading…
Reference in New Issue
Block a user