diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-05-23 03:06:28 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-06-09 20:13:22 +0300 |
commit | be2d2a299a6f854f0494f84169ef82ad5b31a917 (patch) | |
tree | 1afefdc25efda19c13f137a49a88346b763ac8d9 /include | |
parent | Unhide cursor on cursor activity after touch (diff) | |
download | sway-be2d2a299a6f854f0494f84169ef82ad5b31a917.tar.gz sway-be2d2a299a6f854f0494f84169ef82ad5b31a917.tar.zst sway-be2d2a299a6f854f0494f84169ef82ad5b31a917.zip |
commands/input: perform basic keymap validation
Before the delta input config is stored, this attempts to compile a
keymap with it. If the keymap fails to compile, then the first line of
the xkbcommon log entry will be included with a `CMD_FAILURE`, the
entire xkbcommon log entry will be included in the sway error log, and
the delta will not be stored.
This only handles basic issues such as a layouts not existing. This
will NOT catch more complex issues such as when a variant does
exist, but not for the given layout (ex: `azerty` is a valid variant,
but the `us` layout does not have a `azerty` variant).
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/input/keyboard.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sway/input/keyboard.h b/include/sway/input/keyboard.h index b8622053..90214af9 100644 --- a/include/sway/input/keyboard.h +++ b/include/sway/input/keyboard.h | |||
@@ -65,7 +65,8 @@ struct sway_keyboard { | |||
65 | struct sway_binding *repeat_binding; | 65 | struct sway_binding *repeat_binding; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | struct xkb_keymap *sway_keyboard_compile_keymap(struct input_config *ic); | 68 | struct xkb_keymap *sway_keyboard_compile_keymap(struct input_config *ic, |
69 | char **error); | ||
69 | 70 | ||
70 | struct sway_keyboard *sway_keyboard_create(struct sway_seat *seat, | 71 | struct sway_keyboard *sway_keyboard_create(struct sway_seat *seat, |
71 | struct sway_seat_device *device); | 72 | struct sway_seat_device *device); |