[gtk+/gestures: 156/202] drag: Allow gtk_gesture_get_start_point/offset() to be called on ::drag-end
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures: 156/202] drag: Allow gtk_gesture_get_start_point/offset() to be called on ::drag-end
- Date: Fri, 23 May 2014 18:09:29 +0000 (UTC)
commit e638ff79744586eaea549605836f51db6a06ca61
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon May 12 19:11:53 2014 +0200
drag: Allow gtk_gesture_get_start_point/offset() to be called on ::drag-end
gtk/gtkgesturedrag.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkgesturedrag.c b/gtk/gtkgesturedrag.c
index dbcd9c3..141362a 100644
--- a/gtk/gtkgesturedrag.c
+++ b/gtk/gtkgesturedrag.c
@@ -211,8 +211,13 @@ gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture,
gdouble *y)
{
GtkGestureDragPrivate *priv;
+ GdkEventSequence *sequence;
- if (!gtk_gesture_is_recognized (GTK_GESTURE (gesture)))
+ g_return_val_if_fail (GTK_IS_GESTURE_DRAG (gesture), FALSE);
+
+ sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
+
+ if (!gtk_gesture_handles_sequence (GTK_GESTURE (gesture), sequence))
return FALSE;
priv = gtk_gesture_drag_get_instance_private (gesture);
@@ -246,8 +251,13 @@ gtk_gesture_drag_get_offset (GtkGestureDrag *gesture,
gdouble *y)
{
GtkGestureDragPrivate *priv;
+ GdkEventSequence *sequence;
+
+ g_return_val_if_fail (GTK_IS_GESTURE_DRAG (gesture), FALSE);
+
+ sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
- if (!gtk_gesture_is_recognized (GTK_GESTURE (gesture)))
+ if (!gtk_gesture_handles_sequence (GTK_GESTURE (gesture), sequence))
return FALSE;
priv = gtk_gesture_drag_get_instance_private (gesture);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]