[gtk+] wayland: Don't unset the selected mimetype on drop_reply

commit 3a3f2e505a0c544eb0aba169d985bfb27844e857
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Apr 18 18:02:50 2015 +0200

    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 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c
index 71e8e49..9936e54 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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]