[mutter/wip/carlosg/input-thread: 62/104] wayland: Move away from meta_cursor_renderer_get_position()




commit c8da6c868e08c8b43e5f494d125d5aa5ea722282
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jul 13 13:34:59 2020 +0200

    wayland: Move away from meta_cursor_renderer_get_position()
    
    Fetch the cursor renderer device, and query its position instead.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403

 src/wayland/meta-wayland-cursor-surface.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-cursor-surface.c b/src/wayland/meta-wayland-cursor-surface.c
index af1bc170db..7281be8541 100644
--- a/src/wayland/meta-wayland-cursor-surface.c
+++ b/src/wayland/meta-wayland-cursor-surface.c
@@ -187,6 +187,7 @@ meta_wayland_cursor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *role,
     META_WAYLAND_CURSOR_SURFACE (surface->role);
   MetaWaylandCursorSurfacePrivate *priv =
     meta_wayland_cursor_surface_get_instance_private (cursor_surface);
+  ClutterInputDevice *device;
   graphene_point_t point;
   graphene_rect_t logical_monitor_rect;
 
@@ -196,7 +197,8 @@ meta_wayland_cursor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *role,
   logical_monitor_rect =
     meta_rectangle_to_graphene_rect (&logical_monitor->rect);
 
-  point = meta_cursor_renderer_get_position (priv->cursor_renderer);
+  device = meta_cursor_renderer_get_input_device (priv->cursor_renderer);
+  clutter_input_device_get_coords (device, NULL,  &point);
 
   return graphene_rect_contains_point (&logical_monitor_rect, &point);
 }


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