Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

sceeencopy-v1: listen to output destroy in capture_output #3301

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions types/wlr_screencopy_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,6 @@ static void frame_handle_copy(struct wl_client *wl_client,
wl_signal_add(&output->events.destroy, &frame->output_enable);
frame->output_enable.notify = frame_handle_output_enable;

wl_signal_add(&output->events.destroy, &frame->output_destroy);
frame->output_destroy.notify = frame_handle_output_destroy;

wl_resource_add_destroy_listener(buffer_resource, &frame->buffer_destroy);
frame->buffer_destroy.notify = frame_handle_buffer_destroy;

Expand Down Expand Up @@ -538,9 +535,11 @@ static void capture_output(struct wl_client *wl_client,

wl_list_init(&frame->output_commit.link);
wl_list_init(&frame->output_enable.link);
wl_list_init(&frame->output_destroy.link);
wl_list_init(&frame->buffer_destroy.link);

wl_signal_add(&output->events.destroy, &frame->output_destroy);
frame->output_destroy.notify = frame_handle_output_destroy;

if (output == NULL || !output->enabled) {
goto error;
}
Expand Down