summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtkbutton.c3
-rw-r--r--gtk/gtkgesture.c4
-rw-r--r--gtk/gtkspinbutton.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 843c1f49a0..eac1499b0d 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -327,8 +327,6 @@ click_pressed_cb (GtkGestureClick *gesture,
if (!priv->activate_timeout)
priv->button_down = TRUE;
-
- gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
}
static gboolean
@@ -364,6 +362,7 @@ click_released_cb (GtkGestureClick *gesture,
GtkButtonPrivate *priv = gtk_button_get_instance_private (button);
GdkEventSequence *sequence;
+ gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
gtk_button_do_release (button,
gtk_widget_is_sensitive (GTK_WIDGET (button)) &&
(priv->in_button ||
diff --git a/gtk/gtkgesture.c b/gtk/gtkgesture.c
index 1a791d3339..544ef87bd3 100644
--- a/gtk/gtkgesture.c
+++ b/gtk/gtkgesture.c
@@ -1014,6 +1014,10 @@ gtk_gesture_set_sequence_state (GtkGesture *gesture,
data->state != GTK_EVENT_SEQUENCE_NONE)
return FALSE;
+ if (state == GTK_EVENT_SEQUENCE_DENIED &&
+ data->state == GTK_EVENT_SEQUENCE_CLAIMED)
+ _gtk_gesture_cancel_sequence (gesture, sequence);
+
data->state = state;
gtk_widget_cancel_event_sequence (gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)),
gesture, sequence, state);
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 01466dda23..0927efba90 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -851,6 +851,8 @@ button_pressed_cb (GtkGestureClick *gesture,
start_spinning (spin_button, pressed_button, gtk_adjustment_get_step_increment (spin_button->adjustment));
else if (button == GDK_BUTTON_MIDDLE)
start_spinning (spin_button, pressed_button, gtk_adjustment_get_page_increment (spin_button->adjustment));
+
+ gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
}
else
{