From 5174ad90010b1207e049db44da9bcdbde80d1b4d Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 18 Apr 2015 18:02:50 +0200 Subject: [PATCH] wayland: Don't unset the selected mimetype on drop_reply gdk_wayland_drop_context_set_status() can't do much else currently besides picking a mimetype (the first one is currently chosen). This may incorrectly unset the mimetype chosen on .receive(), so the transfer is cancelled before it even starts. At the time drop_reply happens, we should have already picked a mimetype along the way, so only cover for accepted=FALSE in order to unset it. --- gdk/wayland/gdkdnd-wayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c index 71e8e49764..9936e54c49 100644 --- a/gdk/wayland/gdkdnd-wayland.c +++ b/gdk/wayland/gdkdnd-wayland.c @@ -236,7 +236,8 @@ gdk_wayland_drag_context_drop_reply (GdkDragContext *context, gboolean accepted, guint32 time_) { - gdk_wayland_drop_context_set_status (context, accepted); + if (!accepted) + gdk_wayland_drop_context_set_status (context, accepted); } static void