wlr-screencopy protocol selecting incorrect regions with capture_output_region. #10433
Replies: 2 comments 1 reply
-
I made a patched version of Emersion's grim that uses the capture_output_region request instead which has the same buggy behavior. https://github.com/ZnxTech/grim Edit/Update: |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hyprland version
0.49.0
Regression
I am not sure since I haven't used it before discovering this bug.
Bug description
Hi, I have been working on a Wayland based screenshoting and sharing tool and noticed
that the wlr-screencopy protocol is selecting incorrect regions when using the capture_output_region request to create frames of monitors with a transform.
This bug appears to happen only when a part of the monitor is captured and not when the whole is captured using capture_output_region or capture_output requests.
I am using SHM buffers to store the screenshot data and I do not know if this bug happens with Linux DMA-BUF buffers as well.
Examples:
My second monitor which has this config:
monitor=HDMI-A-2, 1920x1080@60, 2560x0, 1, transform, 3
and will be used for these examples.
zwlr_screencopy_ ... _region(state->wayland->wlr_screencopy_manager, 0, output_data->output, 0, 0, 720, 1280);
Resulting image: https://znx.s-ul.eu/WbfoV34r
zwlr_screencopy_ ... _region(state->wayland->wlr_screencopy_manager, 0, output_data->output, 320, 0, 720, 1280);
Resulting image: https://znx.s-ul.eu/yJkLo7UI
zwlr_screencopy_ ... _region(state->wayland->wlr_screencopy_manager, 0, output_data->output, 320, 640, 720, 1280);
Resulting image: https://znx.s-ul.eu/BtO8mY2d
zwlr_screencopy_ ... _region(state->wayland->wlr_screencopy_manager, 0, output_data->output, 0, 640, 720, 1280);
Resulting image: https://znx.s-ul.eu/v4ghcoxz
The whole screen: (and the only correct capture)
zwlr_screencopy_ ... _region(state->wayland->wlr_screencopy_manager, 0, output_data->output, 0, 0, 1080, 1920);
Resulting image: https://znx.s-ul.eu/QyyPge8P
note: this bug is not reproducible with Emersion's grim since it doesn't use the capture_output_region request but rather "crops" from capture_output.
System info and config
hyprctl_systeminfo.txt
Beta Was this translation helpful? Give feedback.
All reactions