backend-drm/drm-virtual: Hang off the drm_backend

This is needed by drm_output_fini_egl() to be able to retrieve the
backend out of the drm_output on the shutdown path of the compositor.

Both the remoting plug-in and the pipewire plug-in are users of the
drm-virtual API and as such they would trigger a crash when shutting
down the compositor, as we're not setting up any backend whatsoever.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2023-02-16 17:45:35 +02:00
parent 583fbcda3b
commit d90533b8ad

View File

@ -375,6 +375,7 @@ drm_virtual_output_create(struct weston_compositor *c, char *name,
output->base.disable = drm_virtual_output_disable;
output->base.attach_head = NULL;
output->backend = b;
output->state_cur = drm_output_state_alloc(output, NULL);
weston_compositor_add_pending_output(&output->base, c);