summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <[email protected]>2021-04-16 09:05:39 +0200
committerSimon Ser <[email protected]>2021-04-19 17:33:28 +0200
commitdec131b71af4dd18695758d883fc424f01b53375 (patch)
treee400626ee1a19c0f097eefb070ae1072e0364526
parentaeace45a14db8d778540e42daa7d813be771873e (diff)
Stop specifying xkb_rule_names
If a NULL xkb_rule_names pointer is passed to xkb_keymap_new_from_names, libxkbcommon will default to reading the XKB_* env variables. So there's no need to do it ourselves. Also s/xkb_map_new_from_names/xkb_keymap_new_from_names/ since the latter is more consistent with the returned struct name. [1]: https://xkbcommon.org/doc/current/structxkb__rule__names.html
-rw-r--r--tinywl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tinywl.c b/tinywl.c
index 3232df3..2f2257e 100644
--- a/tinywl.c
+++ b/tinywl.c
@@ -222,9 +222,8 @@ static void server_new_keyboard(struct tinywl_server *server,
/* 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 };
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
- struct xkb_keymap *keymap = xkb_map_new_from_names(context, &rules,
+ struct xkb_keymap *keymap = xkb_keymap_new_from_names(context, NULL,
XKB_KEYMAP_COMPILE_NO_FLAGS);
wlr_keyboard_set_keymap(device->keyboard, keymap);