mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
backend: introduce wlr_backend_finish
This new functions cleans up the common backend state. While this currently only emits the destroy signal, this will also clean up the renderer and allocator in upcoming patches.
This commit is contained in:
parent
beae3018cb
commit
7ec5bf6b10
9 changed files with 16 additions and 7 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include <wlr/util/log.h>
|
||||
#include "backend/backend.h"
|
||||
#include "backend/multi.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
#if WLR_HAS_X11_BACKEND
|
||||
#include <wlr/backend/x11.h>
|
||||
|
|
@ -32,6 +33,10 @@ void wlr_backend_init(struct wlr_backend *backend,
|
|||
wl_signal_init(&backend->events.new_output);
|
||||
}
|
||||
|
||||
void wlr_backend_finish(struct wlr_backend *backend) {
|
||||
wlr_signal_emit_safe(&backend->events.destroy, backend);
|
||||
}
|
||||
|
||||
bool wlr_backend_start(struct wlr_backend *backend) {
|
||||
if (backend->impl->start) {
|
||||
return backend->impl->start(backend);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue