aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-28 12:47:28 +0100
committeremersion <contact@emersion.fr>2018-04-28 12:48:05 +0100
commit79da4c175eca6f2db5e167a9e3c40ef343d6cd87 (patch)
tree1c3b6729232f2db13b96326849ad16c353de4baa /backend/x11
parent57c36ddcb346e1e2443ad606ff214dc4a74b97b4 (diff)
backend/headless: remove useless destructor
Diffstat (limited to 'backend/x11')
-rw-r--r--backend/x11/backend.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index 35d037b0..f64515ca 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -223,14 +223,9 @@ static void backend_destroy(struct wlr_backend *backend) {
wlr_signal_emit_safe(&x11->pointer_dev.events.destroy, &x11->pointer_dev);
wlr_signal_emit_safe(&x11->keyboard_dev.events.destroy, &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);
- }
+
+ wlr_input_device_destroy(&x11->keyboard_dev);
+ wlr_input_device_destroy(&x11->pointer_dev);
wlr_signal_emit_safe(&backend->events.destroy, backend);