shell: Update to MetaCursorTracker API change
The pointer coordinates in meta_cursor_tracker_get_pointer() are now returned as a graphene_point_t. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1405
This commit is contained in:
@ -181,6 +181,7 @@ draw_cursor_image (cairo_surface_t *surface,
|
||||
int x, y;
|
||||
int xhot, yhot;
|
||||
double xscale, yscale;
|
||||
graphene_point_t point;
|
||||
|
||||
display = shell_global_get_display (shell_global_get ());
|
||||
tracker = meta_cursor_tracker_get_for_display (display);
|
||||
@ -190,9 +191,11 @@ draw_cursor_image (cairo_surface_t *surface,
|
||||
return;
|
||||
|
||||
screenshot_region = cairo_region_create_rectangle (&area);
|
||||
meta_cursor_tracker_get_pointer (tracker, &x, &y, NULL);
|
||||
meta_cursor_tracker_get_pointer (tracker, &point, NULL);
|
||||
x = point.x;
|
||||
y = point.y;
|
||||
|
||||
if (!cairo_region_contains_point (screenshot_region, x, y))
|
||||
if (!cairo_region_contains_point (screenshot_region, point.x, point.y))
|
||||
{
|
||||
cairo_region_destroy (screenshot_region);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user