From 56b948ca203d7f5685b5d59ecf794d9a6739c214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 7 Feb 2022 19:52:35 +0100 Subject: [PATCH] input: call wayl_bindings_reset() when receiving a new keymap --- input.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/input.c b/input.c index 7150f151..986f26bd 100644 --- a/input.c +++ b/input.c @@ -624,15 +624,7 @@ keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, seat->kbd.xkb = NULL; } - tll_foreach(seat->kbd.bindings.key, it) - tll_free(it->item.k.key_codes); - tll_free(seat->kbd.bindings.key); - - tll_foreach(seat->kbd.bindings.search, it) - tll_free(it->item.k.key_codes); - tll_free(seat->kbd.bindings.search); - - tll_free(seat->mouse.bindings); + wayl_bindings_reset(seat); /* Verify keymap is in a format we understand */ switch ((enum wl_keyboard_keymap_format)format) {