aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-05-09 16:33:43 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-05-09 16:41:54 +1000
commit4922d269b8724a895628ca98c2d53890f3fd86b4 (patch)
treeaa6fe90a007a7c016ffa8442826956d8ce99b522 /sway
parent22b873332fa9ca8feaeaf5c36487c36bd9e631c5 (diff)
downloadsway-4922d269b8724a895628ca98c2d53890f3fd86b4.tar.xz
Fix titles on rotated outputs
If the output is rotated, the scissor box needs to be transformed in the opposite rotation.
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/output.c6
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,
// 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);