ext-image-copy-capture-v1: implement PAINT_CURSORS flag

This is unreliable because this is first come, first served: the
first capture stream decides whether or not cursors will be
included. Moreover, if the output lacks hw cursor support, cursors
will always be included. But it's the best we're going to get with
automatic wlr_output sources (and has bug parity with
wlr-screencopy-unstable-v1).
This commit is contained in:
Simon Ser 2024-07-07 22:15:50 +02:00
parent 6bb8bb1cb7
commit 061aa1bd15

View file

@ -389,6 +389,10 @@ static void session_destroy(struct wlr_ext_image_copy_capture_session_v1 *sessio
EXT_IMAGE_COPY_CAPTURE_FRAME_V1_FAILURE_REASON_STOPPED);
}
if (session->source->impl->stop) {
session->source->impl->stop(session->source);
}
ext_image_copy_capture_session_v1_send_stopped(session->resource);
wl_resource_set_user_data(session->resource, NULL);
@ -456,6 +460,10 @@ static void session_create(struct wl_resource *parent_resource, uint32_t new_id,
return;
}
if (source->impl->start) {
source->impl->start(source, options & EXT_IMAGE_COPY_CAPTURE_MANAGER_V1_OPTIONS_PAINT_CURSORS);
}
session->resource = session_resource;
session->source = source;
pixman_region32_init_rect(&session->damage, 0, 0, source->width,