aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2017-08-11 22:55:36 +0200
committerDominique Martinet <asmadeus@codewreck.org>2017-08-12 00:11:18 +0200
commite1293a78530a5de9280ee76e83488a2a04c95c79 (patch)
tree0c4cf34f0134e840ff36aa49f7117cb225b765c0 /backend
parentbe3a0ad065a946c8dfe753368757f3d5744059e6 (diff)
libinput: signal input remove on libinput backend destroy
This lets the upper crust cleanup and free their own states
Diffstat (limited to 'backend')
-rw-r--r--backend/libinput/backend.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c
index 19fe8fe7..58bd62f2 100644
--- a/backend/libinput/backend.c
+++ b/backend/libinput/backend.c
@@ -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++) {
list_t *wlr_devices = state->devices->items[i];
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);
}