mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 19:12:04 +00:00
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
This commit is contained in:
parent
dc022a67b0
commit
4398d63566
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user