x11: Pass the drag source when creating a drop context
authorBenjamin Otte <otte@redhat.com>
Thu, 31 May 2018 19:24:08 +0000 (21:24 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 18 Jun 2018 21:49:52 +0000 (23:49 +0200)
gdk/x11/gdkdnd-x11.c

index 2ab055691f7b14e5d558537e234af236b96f36d3..96993d74ec04b84cde5e9409cfb011a200bf108d 100644 (file)
@@ -1699,6 +1699,7 @@ xdnd_enter_filter (GdkSurface   *surface,
   GdkX11Display *display_x11;
   GdkDragContext *context;
   GdkX11DragContext *context_x11;
+  GdkDragContext *drag;
   GdkSeat *seat;
   gint i;
   Atom type;
@@ -1782,8 +1783,11 @@ xdnd_enter_filter (GdkSurface   *surface,
     print_target_list (content_formats);
 #endif /* G_ENABLE_DEBUG */
 
+  drag = gdk_drag_context_find (display, source_surface, GDK_SURFACE_XID (surface));
+
   context_x11 = g_object_new (GDK_TYPE_X11_DRAG_CONTEXT,
                               "device", gdk_seat_get_pointer (seat),
+                              "drag", drag,
                               "formats", content_formats,
                               "surface", surface,
                               NULL);