mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 02:17:59 +02:00
screenshooter: Don't fail the first time an output won't capture
Historically, weston-screenshooter attempts a capture on all wl_outputs, and if any output fails to capture it exits immediately. These days it's possible to set up the pipewire backend to mirror a drm backend output. This leads to surprising behaviour if one tries to screenshot while no pipewire client is in use. Since the pipewire backend has no buffer to render into at this point, the screenshot fails. The drm screenshot is then dropped on the floor because one of the wl_outputs failed to capture. Avoid this for now by just continuing in the case of such "graceful failures". Though maybe in the future we should allow picking a wl_output by name, or have a command line switch to decide whether to stop after a failure or not. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
724d3707ec
commit
bf311ff232
1 changed files with 3 additions and 1 deletions
|
|
@ -209,7 +209,9 @@ capture_source_handle_failed(void *data,
|
|||
struct screenshooter_output *output = data;
|
||||
|
||||
output->app->waitcount--;
|
||||
output->app->failed = true;
|
||||
/* We don't set app.failed here because there could be other
|
||||
* outputs we still want to capture!
|
||||
*/
|
||||
|
||||
if (msg)
|
||||
fprintf(stderr, "Output capture error: %s\n", msg);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue