From: Kristian Høgsberg Date: Thu, 21 Jun 2012 03:03:53 +0000 (-0400) Subject: compositor-drm: Hide hw cursor if cursor sprite isn't mapped X-Git-Tag: 0.94.90~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2735ea8afdea6b91ff8cb5ce9e7d88bb5961ca4;p=profile%2Fivi%2Fweston.git compositor-drm: Hide hw cursor if cursor sprite isn't mapped --- diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 399269d..2aa2ab0 100644 --- a/src/compositor-drm.c +++ b/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 * as we do for flipping full screen surfaces. */ + seat = (struct weston_seat *) ec->seat; pixman_region32_init(&overlap); 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, &es->transform.boundingbox); - seat = (struct weston_seat *) ec->seat; if (es == seat->sprite) { weston_output_set_cursor(output, seat, &surface_overlap); @@ -722,6 +722,9 @@ drm_assign_planes(struct weston_output *output) } pixman_region32_fini(&overlap); + if (!seat->sprite || !weston_surface_is_mapped(seat->sprite)) + drm_output_set_cursor(output, NULL); + drm_disable_unused_sprites(output); }