mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 10:29:49 +01:00
add backend destroy event
This commit is contained in:
parent
1a96ce0c53
commit
4e804ef40f
2 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,7 @@ void wlr_backend_init(struct wlr_backend *backend,
|
||||||
const struct wlr_backend_impl *impl) {
|
const struct wlr_backend_impl *impl) {
|
||||||
assert(backend);
|
assert(backend);
|
||||||
backend->impl = impl;
|
backend->impl = impl;
|
||||||
|
wl_signal_init(&backend->events.destroy);
|
||||||
wl_signal_init(&backend->events.input_add);
|
wl_signal_init(&backend->events.input_add);
|
||||||
wl_signal_init(&backend->events.input_remove);
|
wl_signal_init(&backend->events.input_remove);
|
||||||
wl_signal_init(&backend->events.output_add);
|
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) {
|
void wlr_backend_destroy(struct wlr_backend *backend) {
|
||||||
|
wl_signal_emit(&backend->events.destroy, backend);
|
||||||
if (backend->impl && backend->impl->destroy) {
|
if (backend->impl && backend->impl->destroy) {
|
||||||
backend->impl->destroy(backend);
|
backend->impl->destroy(backend);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -11,6 +11,7 @@ struct wlr_backend {
|
||||||
const struct wlr_backend_impl *impl;
|
const struct wlr_backend_impl *impl;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
struct wl_signal destroy;
|
||||||
struct wl_signal input_add;
|
struct wl_signal input_add;
|
||||||
struct wl_signal input_remove;
|
struct wl_signal input_remove;
|
||||||
struct wl_signal output_add;
|
struct wl_signal output_add;
|
||||||
|
|
Loading…
Reference in a new issue