diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2021-05-11 17:22:50 +0200 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2022-06-10 09:27:43 +0000 |
commit | aab722bb178584e418eb777392773e36f4647c2e (patch) | |
tree | aa87d51da27838daa8400357fce09c93c257936f /pipewire | |
parent | 54d7682ee844e8bdb2fe9fe9ad445eab30a82999 (diff) |
backend-drm: prepare virtual output API for heterogeneous outputs
Stop plugins from overwriting the struct weston_output::destroy vfunc,
as that will be used by backends to recognize their outputs.
Instead, pass a plugin-specific destroy callback when creating the
virtual output.
See: https://gitlab.freedesktop.org/wayland/weston/-/issues/268
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'pipewire')
-rw-r--r-- | pipewire/pipewire-plugin.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/pipewire/pipewire-plugin.c b/pipewire/pipewire-plugin.c index 23cea2e8..9a913aa3 100644 --- a/pipewire/pipewire-plugin.c +++ b/pipewire/pipewire-plugin.c @@ -67,7 +67,6 @@ struct weston_pipewire { struct pipewire_output { struct weston_output *output; - void (*saved_destroy)(struct weston_output *output); int (*saved_enable)(struct weston_output *output); int (*saved_disable)(struct weston_output *output); int (*saved_start_repaint_loop)(struct weston_output *output); @@ -316,8 +315,6 @@ pipewire_output_destroy(struct weston_output *base_output) free(mode); } - output->saved_destroy(base_output); - pw_stream_destroy(output->stream); wl_list_remove(&output->link); @@ -536,14 +533,12 @@ pipewire_output_create(struct weston_compositor *c, char *name) pw_stream_add_listener(output->stream, &output->stream_listener, &stream_events, output); - output->output = api->create_output(c, name); + output->output = api->create_output(c, name, pipewire_output_destroy); if (!output->output) { weston_log("Cannot create virtual output\n"); goto err; } - output->saved_destroy = output->output->destroy; - output->output->destroy = pipewire_output_destroy; output->saved_enable = output->output->enable; output->output->enable = pipewire_output_enable; output->saved_disable = output->output->disable; |