Merge pull request #1945 from RyanDwyer/fix-title-scissor

Fix titles on rotated outputs
This commit is contained in:
Drew DeVault 2018-05-09 07:58:23 -04:00 committed by GitHub
commit 7d707e6865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -308,7 +308,11 @@ static void render_container_simple_border_normal(struct sway_output *output,
// Title text
if (title_texture) {
wlr_renderer_scissor(renderer, &box);
struct wlr_box scissor_box;
wlr_box_transform(&box,
wlr_output_transform_invert(output->wlr_output->transform),
output->swayc->width, output->swayc->height, &scissor_box);
wlr_renderer_scissor(renderer, &scissor_box);
wlr_render_texture(renderer, title_texture,
output->wlr_output->transform_matrix, box.x, box.y, 1);
wlr_renderer_scissor(renderer, NULL);