[mutter/wip/carlos/fix-dnd-icon: 3/3] wayland: Fix DnD actor set up



commit 7fd062bd41b9befc807bb5a804cdc895f2ee7bfc
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Nov 30 20:39:26 2018 +0100

    wayland: Fix DnD actor set up
    
    Commit 70036429bd4 mixed drag_origin and drag_surface, leading to warnings
    and invisible drag icon. Fix this up so we correctly set up the feedback
    actor. This will correctly display the DnD icon alongside the pointer.

 src/wayland/meta-wayland-data-device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index 9a20e3eb4..648b8d80e 100644
--- a/src/wayland/meta-wayland-data-device.c
+++ b/src/wayland/meta-wayland-data-device.c
@@ -1143,7 +1143,7 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice                 *data
 
   if (icon_surface)
     {
-      ClutterActor *drag_origin_actor;
+      ClutterActor *drag_surface_actor;
 
       drag_grab->drag_surface = icon_surface;
 
@@ -1151,14 +1151,14 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice                 *data
       wl_resource_add_destroy_listener (icon_surface->resource,
                                         &drag_grab->drag_icon_listener);
 
-      drag_origin_actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (drag_grab->drag_origin));
+      drag_surface_actor = CLUTTER_ACTOR (meta_wayland_surface_get_actor (drag_grab->drag_surface));
 
-      drag_grab->feedback_actor = meta_dnd_actor_new (drag_origin_actor,
+      drag_grab->feedback_actor = meta_dnd_actor_new (CLUTTER_ACTOR (surface_actor),
                                                       drag_grab->drag_start_x,
                                                       drag_grab->drag_start_y);
       meta_feedback_actor_set_anchor (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
                                       0, 0);
-      clutter_actor_add_child (drag_grab->feedback_actor, drag_origin_actor);
+      clutter_actor_add_child (drag_grab->feedback_actor, drag_surface_actor);
 
       clutter_input_device_get_coords (seat->pointer->device, NULL, &pos);
       meta_feedback_actor_set_position (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),


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