diff --git a/libweston/compositor.c b/libweston/compositor.c index 39ab4807..d288b23a 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -1467,6 +1467,9 @@ weston_view_update_transform_disable(struct weston_view *view) if (view->alpha == 1.0) { pixman_region32_copy(&view->transform.opaque, &view->surface->opaque); + pixman_region32_intersect(&view->transform.opaque, + &view->transform.opaque, + &view->geometry.scissor); pixman_region32_translate(&view->transform.opaque, view->geometry.x, view->geometry.y); @@ -1504,15 +1507,6 @@ weston_view_update_transform_enable(struct weston_view *view) return -1; } - if (view->alpha == 1.0 && - matrix->type == WESTON_MATRIX_TRANSFORM_TRANSLATE) { - pixman_region32_copy(&view->transform.opaque, - &view->surface->opaque); - pixman_region32_translate(&view->transform.opaque, - matrix->d[12], - matrix->d[13]); - } - pixman_region32_init_rect(&surfregion, 0, 0, view->surface->width, view->surface->height); @@ -1523,6 +1517,18 @@ weston_view_update_transform_enable(struct weston_view *view) view_compute_bbox(view, surfbox, &view->transform.boundingbox); pixman_region32_fini(&surfregion); + if (view->alpha == 1.0 && + matrix->type == WESTON_MATRIX_TRANSFORM_TRANSLATE) { + pixman_region32_copy(&view->transform.opaque, + &view->surface->opaque); + pixman_region32_intersect(&view->transform.opaque, + &view->transform.opaque, + &view->geometry.scissor); + pixman_region32_translate(&view->transform.opaque, + matrix->d[12], + matrix->d[13]); + } + return 0; }