From bd1fab3458307295875162f6c6f8e9420355dad5 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 20 Dec 2021 18:08:06 +0100 Subject: [PATCH] wayland: Honour default Xkb options Currently KWin always uses the Options configured in kxkbrc because QByteArray::constData() is never nullptr. This means that the system default is ignored completely. Read ResetOldOptions to distinguish between explicitly setting no options and using the system default. --- src/xkb.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xkb.cpp b/src/xkb.cpp index cb66780eb7..7cd3b49557 100644 --- a/src/xkb.cpp +++ b/src/xkb.cpp @@ -191,8 +191,13 @@ xkb_keymap *Xkb::loadKeymapFromConfig() .model = model.constData(), .layout = layout.constData(), .variant = variant.constData(), - .options = options.constData() + .options = nullptr, }; + + if (m_configGroup.readEntry("ResetOldOptions", false)) { + ruleNames.options = options.constData(); + } + applyEnvironmentRules(ruleNames); return xkb_keymap_new_from_names(m_context, &ruleNames, XKB_KEYMAP_COMPILE_NO_FLAGS);