[mutter] data-device: Set "dnd" role on the icon surface, not the source one



commit 469b85eb7cbde031a25ce4aec4208a9e05dc9ac7
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Feb 18 16:44:14 2015 +0100

    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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index 13ea84f..16f626d 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)


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