diff --git a/wayback-compositor/wayback-compositor.c b/wayback-compositor/wayback-compositor.c index 5ea49b5..dcacda3 100644 --- a/wayback-compositor/wayback-compositor.c +++ b/wayback-compositor/wayback-compositor.c @@ -227,9 +227,15 @@ static void server_new_keyboard(struct tinywl_server *server, struct wlr_input_d /* We need to prepare an XKB keymap and assign it to the keyboard. This * assumes the defaults (e.g. layout = "us"). */ + struct xkb_rule_names rules = { 0 }; + rules.rules = getenv("XKB_DEFAULT_RULES"); + rules.model = getenv("XKB_DEFAULT_MODEL"); + rules.layout = getenv("XKB_DEFAULT_LAYOUT"); + rules.variant = getenv("XKB_DEFAULT_VARIANT"); + rules.options = getenv("XKB_DEFAULT_OPTIONS"); struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); struct xkb_keymap *keymap = - xkb_keymap_new_from_names(context, NULL, XKB_KEYMAP_COMPILE_NO_FLAGS); + xkb_keymap_new_from_names(context, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS); wlr_keyboard_set_keymap(wlr_keyboard, keymap); xkb_keymap_unref(keymap);