wayshot
wayshot copied to clipboard
Screenshot is shifted, when both scaling and transformation applied to output
The issue is the same, as I have experienced with grim.
TLDR: when the monitor has both scaling and transformation applied to it -- the screenshot area is noticebly shifted and gives black box of nothingness in some areas. I first noticed it in a multi-monitor setup, but after some testing I reproduced it with a single monitor also.
The slurp itself gives correct coordinates, and feeding the coordinates manually doesn't have a correct effect either, unfortunately. I tried fixing it in grim without success and decided to report it here, since wayshot has the same problem.
Note that I have reproduced this on hyprland compositor, maybe sway or something else with needed protocols will give different result, though I don't think it's a compositor issue.
I believe the scale handling issue is known and was reported by andreas initially. The WlBuffer already has pixel perfect scaled content when slurping. But when displaying it to the layer shell for cropping, we don't scale the layer shell window appropriately. Decode tried to fix it by scaling the buffer after copying every byte but that's wasted allocations as we already have pixel perfect buffer... I don't completely understand that section but I believe it is somewhere in the andreas pr stacks
I tried reproducing it in VM with main branch build and it still is reproducible, unfortunately
It was a compositor problem after all, sorry!