keyboard: Show warning when multiple layouts are specified

pull/95/head
Andri Yngvason 2020-12-27 19:34:06 +00:00
parent 07f42ecb36
commit e3af211523
1 changed files with 3 additions and 0 deletions

View File

@ -166,6 +166,9 @@ int keyboard_init(struct keyboard* self, const struct xkb_rule_names* rule_names
if (!self->keymap)
goto keymap_failure;
if (xkb_keymap_num_layouts(self->keymap) > 1)
log_warning("Multiple keyboard layouts have been specified, but only one is supported.\n");
self->state = xkb_state_new(self->keymap);
if (!self->state)
goto state_failure;