From af37f61a31b799d7d6c464a229294ee1cc5b250f Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Thu, 15 Jan 2026 15:22:27 +0100 Subject: [PATCH] ext_image_copy_capture_v1: Only render scene source on damage wlr_scene_output_needs_frame checks wlr_output.needs_frame and wlr_scene_output.gamma_lut_changed, neither of which incur damage. The needs_frame flag is often set by e.g., cursor movement. For the purpose of a capture frame we are only interested in frames with damage. Continue without damage causes session_handle_source_frame to silently skip copying the frame, which causes the session to get stuck: no ready or failed event is emitted, and frame_pending is still set so no further output frame events will occur. Replace the wlr_scene_output_needs_frame call with an explicit damage check, but send frame callbacks even if there is no damage. --- types/ext_image_capture_source_v1/scene.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/ext_image_capture_source_v1/scene.c b/types/ext_image_capture_source_v1/scene.c index ab0a86cac..318a0a4a1 100644 --- a/types/ext_image_capture_source_v1/scene.c +++ b/types/ext_image_capture_source_v1/scene.c @@ -281,7 +281,11 @@ static void source_handle_output_frame(struct wl_listener *listener, void *data) return; } - if (!wlr_scene_output_needs_frame(source->scene_output)) { + if (pixman_region32_empty(&source->scene_output->pending_commit_damage)) { + // We do not need to render but frame callbacks still need to be sent + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + wlr_scene_output_send_frame_done(source->scene_output, &now); return; }