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 <fatzer2@gmail.com>
(cherry picked from commit d0c145d5a3)
pull/478/head
Alexander Golubev 9 months ago committed by Michele Calgaro
parent 28b6fb9bca
commit cfbf60a0c7
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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(",");
}
}
}

Loading…
Cancel
Save