compositor: make overlap computation use the boundingbox

This makes the overlap to account for surface transformations.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
dev
Pekka Paalanen 13 years ago
parent 2267d45f7c
commit 15d60efee9
  1. 15
      src/compositor.c

@ -910,18 +910,15 @@ weston_output_repaint(struct weston_output *output, int msecs)
pixman_region32_init(&overlap); pixman_region32_init(&overlap);
wl_list_for_each(es, &ec->surface_list, link) { wl_list_for_each(es, &ec->surface_list, link) {
weston_surface_update_transform(es);
pixman_region32_init(&surface_overlap); pixman_region32_init(&surface_overlap);
pixman_region32_intersect_rect(&surface_overlap, pixman_region32_intersect(&surface_overlap, &overlap,
&overlap, &es->transform.boundingbox);
es->geometry.x, es->geometry.y,
es->geometry.width,
es->geometry.height);
es->overlapped = pixman_region32_not_empty(&surface_overlap); es->overlapped = pixman_region32_not_empty(&surface_overlap);
pixman_region32_fini(&surface_overlap); pixman_region32_fini(&surface_overlap);
pixman_region32_union_rect(&overlap, &overlap, pixman_region32_union(&overlap, &overlap,
es->geometry.x, es->geometry.y, &es->transform.boundingbox);
es->geometry.width,
es->geometry.height);
} }
weston_output_set_cursor(output, ec->input_device); weston_output_set_cursor(output, ec->input_device);

Loading…
Cancel
Save