mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
libinput: signal input remove on libinput backend destroy
This lets the upper crust cleanup and free their own states
This commit is contained in:
parent
be3a0ad065
commit
e1293a7853
1 changed files with 3 additions and 1 deletions
|
|
@ -84,7 +84,9 @@ static void wlr_libinput_backend_destroy(struct wlr_backend_state *state) {
|
||||||
for (size_t i = 0; i < state->devices->length; i++) {
|
for (size_t i = 0; i < state->devices->length; i++) {
|
||||||
list_t *wlr_devices = state->devices->items[i];
|
list_t *wlr_devices = state->devices->items[i];
|
||||||
for (size_t j = 0; j < wlr_devices->length; j++) {
|
for (size_t j = 0; j < wlr_devices->length; j++) {
|
||||||
wlr_input_device_destroy(wlr_devices->items[j]);
|
struct wlr_input_device *wlr_device = wlr_devices->items[j];
|
||||||
|
wl_signal_emit(&state->backend->events.input_remove, wlr_device);
|
||||||
|
wlr_input_device_destroy(wlr_device);
|
||||||
}
|
}
|
||||||
list_free(wlr_devices);
|
list_free(wlr_devices);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue