diff options
author | Konstantin Pospelov <kupospelov@gmail.com> | 2019-02-19 21:17:07 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-04-26 20:56:48 +0300 |
commit | 998de8fbc5b4115f1fba9853f85484a5a2ec0c84 (patch) | |
tree | e46f48d5d2ddcce650e9adf8b386bf64ddafd08a /sway/commands | |
parent | f1609abe4c20a04b0b57f797b0e864b29840eda8 (diff) |
bindsym: change default keymap for --to-code
Replace XKB_DEFAULT_LAYOUT with NULL as the default layout.
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/input.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sway/commands/input.c b/sway/commands/input.c index 903d574f..2de07de6 100644 --- a/sway/commands/input.c +++ b/sway/commands/input.c @@ -43,24 +43,17 @@ static struct cmd_handler input_config_handlers[] = { * Re-translate keysyms if a change in the input config could affect them. */ static void retranslate_keysyms(struct input_config *input_config) { - bool matched = false; for (int i = 0; i < config->input_configs->length; ++i) { struct input_config *ic = config->input_configs->items[i]; - matched |= ic->identifier == input_config->identifier; - - // the first configured xkb_layout if (ic->xkb_layout) { - if (matched) { + // this is the first config with xkb_layout + if (ic->identifier == input_config->identifier) { translate_keysyms(ic->xkb_layout); } - // nothing has changed return; } } - - // no xkb_layout has been set, restore the default - translate_keysyms(getenv("XKB_DEFAULT_LAYOUT")); } struct cmd_results *cmd_input(int argc, char **argv) { |