From 677f5fcb6ea12bd87ec9347d8cc5431ca53182e8 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 20 Dec 2021 18:08:30 +0100 Subject: [PATCH] wayland: Move m_layoutList assignment out of Xkb::applyEnvironmentRules Xkb::applyEnvironmentRules is meant to do just that, move the unrelated code outside. --- src/xkb.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xkb.cpp b/src/xkb.cpp index 7cd3b49557..079ce0c815 100644 --- a/src/xkb.cpp +++ b/src/xkb.cpp @@ -171,8 +171,6 @@ void Xkb::applyEnvironmentRules(xkb_rule_names &ruleNames) if (ruleNames.options == nullptr) { ruleNames.options = getenv("XKB_DEFAULT_OPTIONS"); } - - m_layoutList = QString::fromLatin1(ruleNames.layout).split(QLatin1Char(',')); } xkb_keymap *Xkb::loadKeymapFromConfig() @@ -200,6 +198,8 @@ xkb_keymap *Xkb::loadKeymapFromConfig() applyEnvironmentRules(ruleNames); + m_layoutList = QString::fromLatin1(ruleNames.layout).split(QLatin1Char(',')); + return xkb_keymap_new_from_names(m_context, &ruleNames, XKB_KEYMAP_COMPILE_NO_FLAGS); } @@ -207,6 +207,7 @@ xkb_keymap *Xkb::loadDefaultKeymap() { xkb_rule_names ruleNames = {}; applyEnvironmentRules(ruleNames); + m_layoutList = QString::fromLatin1(ruleNames.layout).split(QLatin1Char(',')); return xkb_keymap_new_from_names(m_context, &ruleNames, XKB_KEYMAP_COMPILE_NO_FLAGS); }