Compare commits
1 Commits
citadel
...
wip/carlos
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f0cf611e1b |
@ -1361,9 +1361,15 @@ shell_global_get_pointer (ShellGlobal *global,
|
|||||||
{
|
{
|
||||||
ClutterModifierType raw_mods;
|
ClutterModifierType raw_mods;
|
||||||
MetaCursorTracker *tracker;
|
MetaCursorTracker *tracker;
|
||||||
|
graphene_point_t point;
|
||||||
|
|
||||||
tracker = meta_cursor_tracker_get_for_display (global->meta_display);
|
tracker = meta_cursor_tracker_get_for_display (global->meta_display);
|
||||||
meta_cursor_tracker_get_pointer (tracker, x, y, &raw_mods);
|
meta_cursor_tracker_get_pointer (tracker, &point, &raw_mods);
|
||||||
|
|
||||||
|
if (x)
|
||||||
|
*x = point.x;
|
||||||
|
if (y)
|
||||||
|
*y = point.y;
|
||||||
|
|
||||||
*mods = raw_mods & CLUTTER_MODIFIER_MASK;
|
*mods = raw_mods & CLUTTER_MODIFIER_MASK;
|
||||||
}
|
}
|
||||||
|
@ -181,6 +181,7 @@ draw_cursor_image (cairo_surface_t *surface,
|
|||||||
int x, y;
|
int x, y;
|
||||||
int xhot, yhot;
|
int xhot, yhot;
|
||||||
double xscale, yscale;
|
double xscale, yscale;
|
||||||
|
graphene_point_t point;
|
||||||
|
|
||||||
display = shell_global_get_display (shell_global_get ());
|
display = shell_global_get_display (shell_global_get ());
|
||||||
tracker = meta_cursor_tracker_get_for_display (display);
|
tracker = meta_cursor_tracker_get_for_display (display);
|
||||||
@ -190,9 +191,11 @@ draw_cursor_image (cairo_surface_t *surface,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
screenshot_region = cairo_region_create_rectangle (&area);
|
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);
|
cairo_region_destroy (screenshot_region);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user