compositor-drm: Hide hw cursor if cursor sprite isn't mapped

dev
Kristian Høgsberg 13 years ago
parent b21fb9f61e
commit f2735ea8af
  1. 5
      src/compositor-drm.c

@ -692,6 +692,7 @@ drm_assign_planes(struct weston_output *output)
* the client buffer can be used directly for the sprite surface * the client buffer can be used directly for the sprite surface
* as we do for flipping full screen surfaces. * as we do for flipping full screen surfaces.
*/ */
seat = (struct weston_seat *) ec->seat;
pixman_region32_init(&overlap); pixman_region32_init(&overlap);
wl_list_for_each_safe(es, next, &ec->surface_list, link) { wl_list_for_each_safe(es, next, &ec->surface_list, link) {
/* /*
@ -702,7 +703,6 @@ drm_assign_planes(struct weston_output *output)
pixman_region32_intersect(&surface_overlap, &overlap, pixman_region32_intersect(&surface_overlap, &overlap,
&es->transform.boundingbox); &es->transform.boundingbox);
seat = (struct weston_seat *) ec->seat;
if (es == seat->sprite) { if (es == seat->sprite) {
weston_output_set_cursor(output, seat, weston_output_set_cursor(output, seat,
&surface_overlap); &surface_overlap);
@ -722,6 +722,9 @@ drm_assign_planes(struct weston_output *output)
} }
pixman_region32_fini(&overlap); pixman_region32_fini(&overlap);
if (!seat->sprite || !weston_surface_is_mapped(seat->sprite))
drm_output_set_cursor(output, NULL);
drm_disable_unused_sprites(output); drm_disable_unused_sprites(output);
} }

Loading…
Cancel
Save