mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
1 changed files with 1 additions and 3 deletions
|
|
@ -376,7 +376,6 @@ draw_cursor_image (cairo_surface_t *surface,
|
|||
MetaDisplay *display;
|
||||
MetaCursorTracker *tracker;
|
||||
cairo_surface_t *cursor_surface;
|
||||
g_autoptr (MtkRegion) screenshot_region = NULL;
|
||||
cairo_t *cr;
|
||||
int x, y;
|
||||
int xhot, yhot;
|
||||
|
|
@ -390,12 +389,11 @@ draw_cursor_image (cairo_surface_t *surface,
|
|||
if (!texture)
|
||||
return;
|
||||
|
||||
screenshot_region = mtk_region_create_rectangle (&area);
|
||||
meta_cursor_tracker_get_pointer (tracker, &point, NULL);
|
||||
x = point.x;
|
||||
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;
|
||||
|
||||
meta_cursor_tracker_get_hot (tracker, &xhot, &yhot);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue