mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-18 08:08:11 +02:00
screenshot: Use correct buffer size for transformed outputs.
This is a workaround for screenshots with transformed outputs. It reorders the output positions so the correct buffer size is determined for the final image. This assumes the outputs are in succession on the x axis. The outputs are rendered in their transformed state.
This commit is contained in:
parent
fdb4b02501
commit
bb5898341c
1 changed files with 6 additions and 0 deletions
|
|
@ -205,6 +205,12 @@ set_buffer_size(int *width, int *height)
|
|||
struct screenshooter_output *output;
|
||||
min_x = min_y = INT_MAX;
|
||||
max_x = max_y = INT_MIN;
|
||||
int position = 0;
|
||||
|
||||
wl_list_for_each_reverse(output, &output_list, link) {
|
||||
output->offset_x = position;
|
||||
position += output->width;
|
||||
}
|
||||
|
||||
wl_list_for_each(output, &output_list, link) {
|
||||
min_x = MIN(min_x, output->offset_x);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue