mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 10:48:05 +02:00
compositor: weston_output_set_cursor() to use bounding box
If we ever have transformed cursor surfaces, we would better use the bounding box to check if it is on the given output. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
a9f8a21c75
commit
3bfcd4d907
1 changed files with 5 additions and 6 deletions
|
|
@ -846,13 +846,12 @@ weston_output_set_cursor(struct weston_output *output,
|
|||
if (device->sprite == NULL)
|
||||
return;
|
||||
|
||||
pixman_region32_init_rect(&cursor_region,
|
||||
device->sprite->geometry.x,
|
||||
device->sprite->geometry.y,
|
||||
device->sprite->geometry.width,
|
||||
device->sprite->geometry.height);
|
||||
weston_surface_update_transform(device->sprite);
|
||||
|
||||
pixman_region32_intersect(&cursor_region, &cursor_region, &output->region);
|
||||
pixman_region32_init(&cursor_region);
|
||||
pixman_region32_intersect(&cursor_region,
|
||||
&device->sprite->transform.boundingbox,
|
||||
&output->region);
|
||||
|
||||
if (!pixman_region32_not_empty(&cursor_region)) {
|
||||
output->set_hardware_cursor(output, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue