From cfbf60a0c78c9d9e5e390e2eb77d4c8c7b1b55eb Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Wed, 7 Feb 2024 14:15:49 +0300 Subject: [PATCH] kxkb: handle resetOld correctly in cases if all opions already set Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/391 Signed-off-by: Alexander Golubev (cherry picked from commit d0c145d5a3bc3dfa286bc25912b34b902660cc1f) --- kxkb/extension.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp index df61e2fa2..870ee7eb4 100644 --- a/kxkb/extension.cpp +++ b/kxkb/extension.cpp @@ -112,11 +112,9 @@ bool XKBExtension::setXkbOptions(const XkbOptions options) } if (!options.options.isEmpty()) { - p << "-option"; - if (options.resetOld) { - p << options.options; + p << "-option" << options.options; } else { @@ -132,7 +130,9 @@ bool XKBExtension::setXkbOptions(const XkbOptions options) newOptions << option; } } - p << newOptions.join(","); + if (!newOptions.isEmpty()) { + p << "-option" << newOptions.join(","); + } } }