From e3af211523f8c9535e104f4fbe6fc863aaadc87d Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 27 Dec 2020 19:34:06 +0000 Subject: [PATCH] keyboard: Show warning when multiple layouts are specified --- src/keyboard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index 3e87c89..5057d68 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -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;