From f1609abe4c20a04b0b57f797b0e864b29840eda8 Mon Sep 17 00:00:00 2001 From: Konstantin Pospelov Date: Tue, 19 Feb 2019 16:35:35 +0300 Subject: config: simplify keysym translation fields Do not store `xkb_keymap` since it can be retrieved from `xkb_state`. --- sway/commands/bind.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sway/commands') diff --git a/sway/commands/bind.c b/sway/commands/bind.c index e5fd4433..ea8179bb 100644 --- a/sway/commands/bind.c +++ b/sway/commands/bind.c @@ -604,7 +604,7 @@ struct keycode_matches { static void find_keycode(struct xkb_keymap *keymap, xkb_keycode_t keycode, void *data) { xkb_keysym_t keysym = xkb_state_key_get_one_sym( - config->keysym_translation.xkb_state, keycode); + config->keysym_translation_state, keycode); if (keysym == XKB_KEY_NoSymbol) { return; @@ -627,7 +627,8 @@ static struct keycode_matches get_keycode_for_keysym(xkb_keysym_t keysym) { .count = 0, }; - xkb_keymap_key_for_each(config->keysym_translation.xkb_keymap, + xkb_keymap_key_for_each( + xkb_state_get_keymap(config->keysym_translation_state), find_keycode, &matches); return matches; } -- cgit v1.2.3