From af521c0703c34bda712f971fb0e80ac36e8d56e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20D=C3=A9saulniers?= Date: Sat, 11 Apr 2026 20:59:57 -0400 Subject: [PATCH] ext-image-capture-source/output: don't lock direct scanout while capturing The lock_attach_render call in output_source_start() disables direct scanout for the entire duration of an ext-image-copy-capture session. This forces the compositor to perform composited rendering on every frame, which causes visible stuttering in fullscreen applications (e.g. games running via XWayland/DXVK). Unlike wlr-screencopy, ext-image-copy-capture receives the committed buffer via output_event_commit (event->state->buffer), which is valid regardless of whether direct scanout is active. The render lock is therefore unnecessary for this protocol. When cursors are requested, lock_software_cursors already implicitly prevents direct scanout whenever the cursor is visible, ensuring cursors appear correctly in the captured output. Refs: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3953 --- types/ext_image_capture_source_v1/output.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/types/ext_image_capture_source_v1/output.c b/types/ext_image_capture_source_v1/output.c index 0e3a57823..4f36edbda 100644 --- a/types/ext_image_capture_source_v1/output.c +++ b/types/ext_image_capture_source_v1/output.c @@ -50,7 +50,6 @@ static void output_source_start(struct wlr_ext_image_capture_source_v1 *base, if (source->num_started > 1) { return; } - wlr_output_lock_attach_render(source->output, true); if (with_cursors) { wlr_output_lock_software_cursors(source->output, true); } @@ -64,7 +63,6 @@ static void output_source_stop(struct wlr_ext_image_capture_source_v1 *base) { if (source->num_started > 0) { return; } - wlr_output_lock_attach_render(source->output, false); if (source->software_cursors_locked) { wlr_output_lock_software_cursors(source->output, false); }