diff options
Diffstat (limited to 'sway/commands/input.c')
-rw-r--r-- | sway/commands/input.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sway/commands/input.c b/sway/commands/input.c index 0195082c..23a6644f 100644 --- a/sway/commands/input.c +++ b/sway/commands/input.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <strings.h> | 2 | #include <strings.h> |
3 | #include "sway/commands.h" | 3 | #include "sway/commands.h" |
4 | #include "sway/input/input-manager.h" | 4 | #include "sway/input/input-manager.h" |
5 | #include "sway/input/keyboard.h" | ||
5 | #include "log.h" | 6 | #include "log.h" |
6 | #include "stringop.h" | 7 | #include "stringop.h" |
7 | 8 | ||
@@ -86,6 +87,20 @@ struct cmd_results *cmd_input(int argc, char **argv) { | |||
86 | } | 87 | } |
87 | 88 | ||
88 | if (!res || res->status == CMD_SUCCESS) { | 89 | if (!res || res->status == CMD_SUCCESS) { |
90 | char *error = NULL; | ||
91 | struct xkb_keymap *keymap = sway_keyboard_compile_keymap( | ||
92 | config->handler_context.input_config, &error); | ||
93 | if (!keymap) { | ||
94 | if (res) { | ||
95 | free_cmd_results(res); | ||
96 | } | ||
97 | res = cmd_results_new(CMD_FAILURE, "Failed to compile keymap: %s", | ||
98 | error ? error : "(details unavailable)"); | ||
99 | free(error); | ||
100 | return res; | ||
101 | } | ||
102 | xkb_keymap_unref(keymap); | ||
103 | |||
89 | struct input_config *ic = | 104 | struct input_config *ic = |
90 | store_input_config(config->handler_context.input_config); | 105 | store_input_config(config->handler_context.input_config); |
91 | 106 | ||