diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-07-13 13:34:59 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2020-10-08 23:33:48 +0200 |
commit | f49aada4797fa4543da23a2c18a0f1ac80fb96c8 (patch) | |
tree | b743bda659c3943169c6e6f362f92a2a1d520eba | |
parent | eb1c9540092c19a86927f5b1e41f2c89491122d7 (diff) | |
download | mutter-f49aada4797fa4543da23a2c18a0f1ac80fb96c8.tar.gz |
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
-rw-r--r-- | src/wayland/meta-wayland-cursor-surface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-cursor-surface.c b/src/wayland/meta-wayland-cursor-surface.c index af1bc170d..7281be854 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); } |