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.
This commit is contained in:
Fabian Vogt 2021-12-20 18:08:06 +01:00 committed by Vlad Zahorodnii
parent 81f9da17fd
commit bd1fab3458

View file

@ -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);