diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-05-09 07:58:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-09 07:58:23 -0400 |
commit | 7d707e6865cb123018157582f673711f20cda2f2 (patch) | |
tree | e18c236f6984001e2fd8aced46b81f8c21502200 | |
parent | Merge pull request #1944 from RyanDwyer/swaybar-respect-pango (diff) | |
parent | Merge branch 'master' into fix-title-scissor (diff) | |
download | sway-7d707e6865cb123018157582f673711f20cda2f2.tar.gz sway-7d707e6865cb123018157582f673711f20cda2f2.tar.zst sway-7d707e6865cb123018157582f673711f20cda2f2.zip |
Merge pull request #1945 from RyanDwyer/fix-title-scissor
Fix titles on rotated outputs
-rw-r--r-- | sway/desktop/output.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index d17a6e14..9b0f1ae3 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -308,7 +308,11 @@ static void render_container_simple_border_normal(struct sway_output *output, | |||
308 | 308 | ||
309 | // Title text | 309 | // Title text |
310 | if (title_texture) { | 310 | if (title_texture) { |
311 | wlr_renderer_scissor(renderer, &box); | 311 | struct wlr_box scissor_box; |
312 | wlr_box_transform(&box, | ||
313 | wlr_output_transform_invert(output->wlr_output->transform), | ||
314 | output->swayc->width, output->swayc->height, &scissor_box); | ||
315 | wlr_renderer_scissor(renderer, &scissor_box); | ||
312 | wlr_render_texture(renderer, title_texture, | 316 | wlr_render_texture(renderer, title_texture, |
313 | output->wlr_output->transform_matrix, box.x, box.y, 1); | 317 | output->wlr_output->transform_matrix, box.x, box.y, 1); |
314 | wlr_renderer_scissor(renderer, NULL); | 318 | wlr_renderer_scissor(renderer, NULL); |