aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-12-02 13:17:37 -0500
committerGitHub <noreply@github.com>2018-12-02 13:17:37 -0500
commit974a3fbc5993946ede98250b006a1a7bc20df719 (patch)
tree559c0a1a48e009c36fc8e656b16745328cc21945 /sway/desktop/render.c
parent20e7584c3aafe37db55fce1ab1c1088b31f1fe10 (diff)
parented7bd683a763eebfac9278ffafa9c4537771d84b (diff)
Merge pull request #3227 from emersion/swap-buffers-damage-coords
Update for swaywm/wlroots#1403
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index ca8ef83b..2afed82d 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -1079,15 +1079,22 @@ renderer_end:
wlr_render_texture(renderer, root->debug_tree,
wlr_output->transform_matrix, 0, 40, 1);
}
- if (debug.damage == DAMAGE_HIGHLIGHT) {
- int width, height;
- wlr_output_transformed_resolution(wlr_output, &width, &height);
- pixman_region32_union_rect(damage, damage, 0, 0, width, height);
- }
wlr_renderer_scissor(renderer, NULL);
wlr_output_render_software_cursors(wlr_output, damage);
wlr_renderer_end(renderer);
+
+ int width, height;
+ wlr_output_transformed_resolution(wlr_output, &width, &height);
+
+ if (debug.damage == DAMAGE_HIGHLIGHT) {
+ pixman_region32_union_rect(damage, damage, 0, 0, width, height);
+ }
+
+ enum wl_output_transform transform =
+ wlr_output_transform_invert(wlr_output->transform);
+ wlr_region_transform(damage, damage, transform, width, height);
+
if (!wlr_output_damage_swap_buffers(output->damage, when, damage)) {
return;
}