add backend destroy event
This commit is contained in:
parent
1a96ce0c53
commit
4e804ef40f
|
@ -18,6 +18,7 @@ void wlr_backend_init(struct wlr_backend *backend,
|
|||
const struct wlr_backend_impl *impl) {
|
||||
assert(backend);
|
||||
backend->impl = impl;
|
||||
wl_signal_init(&backend->events.destroy);
|
||||
wl_signal_init(&backend->events.input_add);
|
||||
wl_signal_init(&backend->events.input_remove);
|
||||
wl_signal_init(&backend->events.output_add);
|
||||
|
@ -32,6 +33,7 @@ bool wlr_backend_start(struct wlr_backend *backend) {
|
|||
}
|
||||
|
||||
void wlr_backend_destroy(struct wlr_backend *backend) {
|
||||
wl_signal_emit(&backend->events.destroy, backend);
|
||||
if (backend->impl && backend->impl->destroy) {
|
||||
backend->impl->destroy(backend);
|
||||
} else {
|
||||
|
|
|
@ -11,6 +11,7 @@ struct wlr_backend {
|
|||
const struct wlr_backend_impl *impl;
|
||||
|
||||
struct {
|
||||
struct wl_signal destroy;
|
||||
struct wl_signal input_add;
|
||||
struct wl_signal input_remove;
|
||||
struct wl_signal output_add;
|
||||
|
|
Loading…
Reference in New Issue