diff options
author | Benjamin Otte <otte@redhat.com> | 2017-12-11 22:55:54 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-12-12 00:31:49 +0100 |
commit | 04ac4c66aeeb559983b74d97b44db72b0f5028cc (patch) | |
tree | 4fd0c958335fcfe94e09357ba0f2845e1a0742c2 /gtk/gtkcalendar.c | |
parent | 23c798b41d57bb4f8255f61c6f0f3b6e1516eeca (diff) | |
download | gtk+-04ac4c66aeeb559983b74d97b44db72b0f5028cc.tar.gz |
dnd: Pass device, not event
You don't start a dnd operation with a device, you start it with an
event.
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r-- | gtk/gtkcalendar.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index f3e20a050c..a745f394e6 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -2665,8 +2665,6 @@ gtk_calendar_drag_update (GtkGestureDrag *gesture, gdouble start_x, start_y; GdkDragContext *context; GdkContentFormats *targets; - GdkEventSequence *sequence; - GdkEvent *last_event; if (!priv->in_drag) return; @@ -2676,20 +2674,17 @@ gtk_calendar_drag_update (GtkGestureDrag *gesture, gtk_gesture_drag_get_start_point (gesture, &start_x, &start_y); - sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)); - last_event = gdk_event_copy (gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence)); - gtk_event_controller_reset (GTK_EVENT_CONTROLLER (gesture)); targets = gdk_content_formats_new (NULL, 0); targets = gtk_content_formats_add_text_targets (targets); - context = gtk_drag_begin_with_coordinates (widget, targets, GDK_ACTION_COPY, - last_event, + context = gtk_drag_begin_with_coordinates (widget, + gtk_gesture_get_device (GTK_GESTURE (gesture)), + targets, GDK_ACTION_COPY, start_x, start_y); priv->in_drag = 0; gdk_content_formats_unref (targets); - gdk_event_free (last_event); gtk_drag_set_icon_default (context); } |