diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-18 15:54:49 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-18 15:54:49 -0500 |
commit | b5686355f3672769c300022a0b4267745594fe4f (patch) | |
tree | 845bbb6144281a07c87c67b88b064053b4478bcd /backend/x11 | |
parent | c59210ad1732c35f3b4c4c03eb9cf18f6296d8ca (diff) |
add some input device cleanup to x11 backend
Diffstat (limited to 'backend/x11')
-rw-r--r-- | backend/x11/backend.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/backend/x11/backend.c b/backend/x11/backend.c index a218c589..f6f9cfa8 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -244,6 +244,17 @@ static void wlr_x11_backend_destroy(struct wlr_backend *backend) { struct wlr_x11_output *output = &x11->output; wlr_output_destroy(&output->wlr_output); + wl_signal_emit(&backend->events.input_remove, &x11->pointer_dev); + wl_signal_emit(&backend->events.input_remove, &x11->keyboard_dev); + // TODO probably need to use wlr_keyboard_destroy, but the devices need to + // be malloced for that to work + if (x11->keyboard_dev.keyboard->keymap) { + xkb_keymap_unref(x11->keyboard_dev.keyboard->keymap); + } + if (x11->keyboard_dev.keyboard->xkb_state) { + xkb_state_unref(x11->keyboard_dev.keyboard->xkb_state); + } + wl_list_remove(&x11->display_destroy.link); wl_event_source_remove(x11->frame_timer); |