[mutter] wayland/dnd-surface: Use new API to set geometry scale of feedback actor



commit 04eeeb78d12f653abad32755ff041f4b3705c0e3
Author: Robert Mader <robert mader posteo de>
Date:   Fri Jan 22 15:29:08 2021 +0100

    wayland/dnd-surface: Use new API to set geometry scale of feedback actor
    
    The removed parts are now all handled in MetaFeedbackActor.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1683>

 src/wayland/meta-wayland-dnd-surface.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/src/wayland/meta-wayland-dnd-surface.c b/src/wayland/meta-wayland-dnd-surface.c
index bdd80f53a2..047de6e2b3 100644
--- a/src/wayland/meta-wayland-dnd-surface.c
+++ b/src/wayland/meta-wayland-dnd-surface.c
@@ -30,7 +30,6 @@ struct _MetaWaylandSurfaceRoleDND
   MetaWaylandActorSurface parent;
   int32_t pending_offset_x;
   int32_t pending_offset_y;
-  int geometry_scale;
 };
 
 G_DEFINE_TYPE (MetaWaylandSurfaceRoleDND,
@@ -122,27 +121,19 @@ dnd_subsurface_sync_actor_state (MetaWaylandActorSurface *actor_surface)
 
   geometry_scale =
     meta_wayland_actor_surface_get_geometry_scale (actor_surface);
+  meta_feedback_actor_set_geometry_scale (feedback_actor, geometry_scale);
 
   meta_feedback_actor_get_anchor (feedback_actor, &anchor_x, &anchor_y);
-  anchor_x -= surface_role_dnd->pending_offset_x * geometry_scale;
-  anchor_y -= surface_role_dnd->pending_offset_y * geometry_scale;
+  anchor_x -= surface_role_dnd->pending_offset_x;
+  anchor_y -= surface_role_dnd->pending_offset_y;
   meta_feedback_actor_set_anchor (feedback_actor, anchor_x, anchor_y);
 
-  if (surface_role_dnd->geometry_scale != geometry_scale)
-    {
-      surface_role_dnd->geometry_scale = geometry_scale;
-      clutter_actor_set_scale (CLUTTER_ACTOR (surface_actor),
-                               geometry_scale,
-                               geometry_scale);
-    }
-
   actor_surface_class->sync_actor_state (actor_surface);
 }
 
 static void
 meta_wayland_surface_role_dnd_init (MetaWaylandSurfaceRoleDND *role)
 {
-  role->geometry_scale = 1;
 }
 
 static void


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