[mutter/wip/carlosg/input-thread: 47/96] wayland: Replace cursor renderer usage with cursor tracker




commit a3073cb76c2f929b4909f4f339f0b747f442d720
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jul 10 23:28:17 2020 +0200

    wayland: Replace cursor renderer usage with cursor tracker
    
    We just want to know the pointer position, let's use something else
    here.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403

 src/wayland/meta-wayland-dnd-surface.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/wayland/meta-wayland-dnd-surface.c b/src/wayland/meta-wayland-dnd-surface.c
index c3b0f7557b..eb0dc85df0 100644
--- a/src/wayland/meta-wayland-dnd-surface.c
+++ b/src/wayland/meta-wayland-dnd-surface.c
@@ -74,16 +74,14 @@ static MetaLogicalMonitor *
 dnd_surface_find_logical_monitor (MetaWaylandActorSurface *actor_surface)
 {
   MetaBackend *backend = meta_get_backend ();
-  MetaCursorRenderer *cursor_renderer =
-    meta_backend_get_cursor_renderer (backend);
+  MetaCursorTracker *cursor_tracker =
+    meta_backend_get_cursor_tracker (backend);
   MetaMonitorManager *monitor_manager =
      meta_backend_get_monitor_manager (backend);
-  graphene_point_t pointer_pos;
+  int x, y;
 
-  pointer_pos = meta_cursor_renderer_get_position (cursor_renderer);
-  return meta_monitor_manager_get_logical_monitor_at (monitor_manager,
-                                                      pointer_pos.x,
-                                                      pointer_pos.y);
+  meta_cursor_tracker_get_pointer (cursor_tracker, &x, &y, NULL);
+  return meta_monitor_manager_get_logical_monitor_at (monitor_manager, x, y);
 }
 
 static double


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