wayland backend: emit signal for input/output removal

This commit is contained in:
Dominique Martinet 2017-08-12 01:16:12 +02:00
parent c323bfc6a0
commit 8427749dd0
3 changed files with 7 additions and 4 deletions

View file

@ -169,6 +169,7 @@ static struct wl_keyboard_listener keyboard_listener = {
};
static void input_device_destroy(struct wlr_input_device_state *state) {
wl_signal_emit(&state->backend->backend->events.input_remove, state->wlr_device);
if (state->resource)
wl_proxy_destroy(state->resource);
free(state);
@ -206,7 +207,7 @@ static struct wlr_input_device *allocate_device(struct wlr_backend_state *state,
free(devstate);
return NULL;
}
devstate->wlr_device = wlr_device;
list_add(state->devices, wlr_device);
return wlr_device;
}