From 1ecc1b5987907f6fc32dcb3da5adf797bd498ef6 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 6 Dec 2020 16:51:40 +0100 Subject: screencopy: use output transform for damage copy --- types/wlr_screencopy_v1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c index 59cd5b9d..4444b8c0 100644 --- a/types/wlr_screencopy_v1.c +++ b/types/wlr_screencopy_v1.c @@ -48,18 +48,18 @@ static void screencopy_damage_accumulate(struct screencopy_damage *damage) { return; } + int width, height; + wlr_output_transformed_resolution(output, &width, &height); + // If the compositor did not submit damage but did submit a buffer, if (!(output->pending.committed & WLR_OUTPUT_STATE_DAMAGE) && (output->pending.committed & WLR_OUTPUT_STATE_BUFFER)) { // damage everything - int width, height; - wlr_output_transformed_resolution(output, &width, &height); pixman_region32_union_rect(region, region, 0, 0, width, height); } else { // otherwise copy over the current damage pixman_region32_union(region, region, &output->pending.damage); - pixman_region32_intersect_rect(region, region, 0, 0, output->width, - output->height); + pixman_region32_intersect_rect(region, region, 0, 0, width, height); } damage->last_commit_seq = output->commit_seq; -- cgit v1.2.3