mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 18:39:48 +01:00
screencopy: use output transform for damage copy
This commit is contained in:
parent
1477401acd
commit
1ecc1b5987
1 changed files with 4 additions and 4 deletions
|
@ -48,18 +48,18 @@ static void screencopy_damage_accumulate(struct screencopy_damage *damage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int width, height;
|
||||||
|
wlr_output_transformed_resolution(output, &width, &height);
|
||||||
|
|
||||||
// If the compositor did not submit damage but did submit a buffer,
|
// If the compositor did not submit damage but did submit a buffer,
|
||||||
if (!(output->pending.committed & WLR_OUTPUT_STATE_DAMAGE) &&
|
if (!(output->pending.committed & WLR_OUTPUT_STATE_DAMAGE) &&
|
||||||
(output->pending.committed & WLR_OUTPUT_STATE_BUFFER)) {
|
(output->pending.committed & WLR_OUTPUT_STATE_BUFFER)) {
|
||||||
// damage everything
|
// damage everything
|
||||||
int width, height;
|
|
||||||
wlr_output_transformed_resolution(output, &width, &height);
|
|
||||||
pixman_region32_union_rect(region, region, 0, 0, width, height);
|
pixman_region32_union_rect(region, region, 0, 0, width, height);
|
||||||
} else {
|
} else {
|
||||||
// otherwise copy over the current damage
|
// otherwise copy over the current damage
|
||||||
pixman_region32_union(region, region, &output->pending.damage);
|
pixman_region32_union(region, region, &output->pending.damage);
|
||||||
pixman_region32_intersect_rect(region, region, 0, 0, output->width,
|
pixman_region32_intersect_rect(region, region, 0, 0, width, height);
|
||||||
output->height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
damage->last_commit_seq = output->commit_seq;
|
damage->last_commit_seq = output->commit_seq;
|
||||||
|
|
Loading…
Reference in a new issue