aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-12-07 11:02:04 +0100
committerSimon Ser <contact@emersion.fr>2020-12-07 11:16:45 +0100
commitbaf2319fd38659a0ab35e4767e267d32e8c9f150 (patch)
tree528ac52d53f17e1e6d3fed3b53f91146da16bad3
parent54b7ca56c06c0a9a658b5aea06605b964e66ca81 (diff)
screencopy: don't use output transform for damage copy
Only wlr_output_damage works in transformed coordinates, wlr_output->damage is in output-buffer-local coordinates. This essentially reverts 1ecc1b5 and fixes 1477401.
-rw-r--r--types/wlr_screencopy_v1.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c
index b4d47fbd..6feb0742 100644
--- a/types/wlr_screencopy_v1.c
+++ b/types/wlr_screencopy_v1.c
@@ -48,17 +48,16 @@ static void screencopy_damage_accumulate(struct screencopy_damage *damage) {
return;
}
- int width, height;
- wlr_output_transformed_resolution(output, &width, &height);
-
if (output->pending.committed & WLR_OUTPUT_STATE_DAMAGE) {
// If the compositor submitted damage, copy it over
pixman_region32_union(region, region, &output->pending.damage);
- pixman_region32_intersect_rect(region, region, 0, 0, width, height);
+ pixman_region32_intersect_rect(region, region, 0, 0,
+ output->width, output->height);
} else if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) {
// If the compositor did not submit damage but did submit a buffer
// damage everything
- pixman_region32_union_rect(region, region, 0, 0, width, height);
+ pixman_region32_union_rect(region, region, 0, 0,
+ output->width, output->height);
}
damage->last_commit_seq = output->commit_seq;