rootston: fix clipped SSD for rotated views

This commit is contained in:
emersion 2018-01-28 12:14:23 +01:00
parent 485aa87468
commit 692d33bf8b
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 5 additions and 2 deletions

View File

@ -287,10 +287,13 @@ static void render_decorations(struct roots_view *view,
struct wlr_box box; struct wlr_box box;
get_decoration_box(view, output, &box); get_decoration_box(view, output, &box);
struct wlr_box rotated;
wlr_box_rotated_bounds(&box, -view->rotation, &rotated);
pixman_region32_t damage; pixman_region32_t damage;
pixman_region32_init(&damage); pixman_region32_init(&damage);
pixman_region32_union_rect(&damage, &damage, box.x, box.y, pixman_region32_union_rect(&damage, &damage, rotated.x, rotated.y,
box.width, box.height); rotated.width, rotated.height);
pixman_region32_intersect(&damage, &damage, data->damage); pixman_region32_intersect(&damage, &damage, data->damage);
bool damaged = pixman_region32_not_empty(&damage); bool damaged = pixman_region32_not_empty(&damage);
if (!damaged) { if (!damaged) {