From 469b85eb7cbde031a25ce4aec4208a9e05dc9ac7 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 18 Feb 2015 16:44:14 +0100 Subject: [PATCH] data-device: Set "dnd" role on the icon surface, not the source one The DnD source surface evidently has other role assigned, it's the icon surface which is supposed to be a fresh one. --- src/wayland/meta-wayland-data-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index 13ea84f2e..16f626d27 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -410,7 +410,8 @@ data_device_start_drag (struct wl_client *client, seat->pointer.grab != &seat->pointer.default_grab) return; - if (meta_wayland_surface_set_role (surface, + if (icon_resource && + meta_wayland_surface_set_role (wl_resource_get_user_data (icon_resource), META_WAYLAND_SURFACE_ROLE_DND, resource, WL_DATA_DEVICE_ERROR_ROLE) != 0)