aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-05-05 07:25:10 -0400
committerGitHub <noreply@github.com>2018-05-05 07:25:10 -0400
commit8dae168b77173f086880db0878f0a4b34a53e8b3 (patch)
treed88f77c7ca8d54d8a64c3e713a05c6b9d18c59f7 /sway/desktop
parentfbcbbb976c29bb2c4b1bc6aeb6331acd10c70f5f (diff)
parente83e5487be4142af290e772199c2870d6140be46 (diff)
downloadsway-8dae168b77173f086880db0878f0a4b34a53e8b3.tar.xz
Merge pull request #1918 from RyanDwyer/title-scissor
Use scissor to render title texture
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/output.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 03af4239..d17a6e14 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -308,12 +308,10 @@ static void render_container_simple_border_normal(struct sway_output *output,
// Title text
if (title_texture) {
- double x = (con->x + con->sway_view->border_thickness)
- * output->wlr_output->scale;
- double y = (con->y + con->sway_view->border_thickness)
- * output->wlr_output->scale;
+ wlr_renderer_scissor(renderer, &box);
wlr_render_texture(renderer, title_texture,
- output->wlr_output->transform_matrix, x, y, 1);
+ output->wlr_output->transform_matrix, box.x, box.y, 1);
+ wlr_renderer_scissor(renderer, NULL);
}
}