[gtk+/gtk-3-16] wayland: Don't unset the selected mimetype on drop_reply



commit 5174ad90010b1207e049db44da9bcdbde80d1b4d
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]