shell/screenshot: Don't use region type where rect is enough
New API added in https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3801 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3366>
This commit is contained in:
parent
2d5307c01d
commit
cbf1d372f1
@ -376,7 +376,6 @@ draw_cursor_image (cairo_surface_t *surface,
|
|||||||
MetaDisplay *display;
|
MetaDisplay *display;
|
||||||
MetaCursorTracker *tracker;
|
MetaCursorTracker *tracker;
|
||||||
cairo_surface_t *cursor_surface;
|
cairo_surface_t *cursor_surface;
|
||||||
g_autoptr (MtkRegion) screenshot_region = NULL;
|
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
int x, y;
|
int x, y;
|
||||||
int xhot, yhot;
|
int xhot, yhot;
|
||||||
@ -390,12 +389,11 @@ draw_cursor_image (cairo_surface_t *surface,
|
|||||||
if (!texture)
|
if (!texture)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
screenshot_region = mtk_region_create_rectangle (&area);
|
|
||||||
meta_cursor_tracker_get_pointer (tracker, &point, NULL);
|
meta_cursor_tracker_get_pointer (tracker, &point, NULL);
|
||||||
x = point.x;
|
x = point.x;
|
||||||
y = point.y;
|
y = point.y;
|
||||||
|
|
||||||
if (!mtk_region_contains_point (screenshot_region, point.x, point.y))
|
if (!mtk_rectangle_contains_point (&area, point.x, point.y))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
meta_cursor_tracker_get_hot (tracker, &xhot, &yhot);
|
meta_cursor_tracker_get_hot (tracker, &xhot, &yhot);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user