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>
dev
Pekka Paalanen 13 years ago
parent a9f8a21c75
commit 3bfcd4d907
  1. 11
      src/compositor.c

@ -846,13 +846,12 @@ weston_output_set_cursor(struct weston_output *output,
if (device->sprite == NULL) if (device->sprite == NULL)
return; return;
pixman_region32_init_rect(&cursor_region, weston_surface_update_transform(device->sprite);
device->sprite->geometry.x,
device->sprite->geometry.y,
device->sprite->geometry.width,
device->sprite->geometry.height);
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)) { if (!pixman_region32_not_empty(&cursor_region)) {
output->set_hardware_cursor(output, NULL); output->set_hardware_cursor(output, NULL);

Loading…
Cancel
Save