aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-12-18 16:16:36 -0500
committerGitHub <noreply@github.com>2017-12-18 16:16:36 -0500
commit89fb0f14623aafb7ebc2d38a65022116e2f4fb03 (patch)
tree845bbb6144281a07c87c67b88b064053b4478bcd /backend
parentc91523c57888c257fa650ffa2574c470f7a788fe (diff)
parentb5686355f3672769c300022a0b4267745594fe4f (diff)
Merge pull request #501 from acrisci/keyboard-fixes
misc keyboard fixes
Diffstat (limited to 'backend')
-rw-r--r--backend/x11/backend.c11
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);