mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Don't manually parse XKB_* env vars
libxkbcommon will do it for us if we provide a NULL struct xkb_rule_names.
This commit is contained in:
parent
646b3e80b4
commit
cdb1cdf3b4
1 changed files with 1 additions and 7 deletions
8
seat.c
8
seat.c
|
|
@ -355,13 +355,7 @@ handle_new_keyboard(struct cg_seat *seat, struct wlr_input_device *device)
|
|||
return;
|
||||
}
|
||||
|
||||
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_keymap *keymap = xkb_map_new_from_names(context, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
struct xkb_keymap *keymap = xkb_keymap_new_from_names(context, NULL, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
if (!keymap) {
|
||||
wlr_log(WLR_ERROR, "Unable to configure keyboard: keymap does not exist");
|
||||
xkb_context_unref(context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue