summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2025-01-13 16:01:19 +0200
committerMavridis Philippe <[email protected]>2025-01-15 15:22:02 +0200
commitf140898676a7e083441b64f92dff7f4f10f6c7b4 (patch)
tree2139a4154002ade63ff44c03b953d593a13b5d60
parent9a05c36a0b45cf9c41a70582a3206af356b1a066 (diff)
downloadtdebase-f140898676a7e083441b64f92dff7f4f10f6c7b4.tar.gz
tdebase-f140898676a7e083441b64f92dff7f4f10f6c7b4.zip
KXkb: do not run setxkbmap without arguments
Signed-off-by: Mavridis Philippe <[email protected]>
-rw-r--r--kxkb/extension.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp
index 8197043aa..a7da41ead 100644
--- a/kxkb/extension.cpp
+++ b/kxkb/extension.cpp
@@ -85,7 +85,9 @@ bool XKBExtension::setXkbOptions(const XkbOptions options)
{
TQString exe = TDEGlobal::dirs()->findExe("setxkbmap");
if (exe.isEmpty())
+ {
return false;
+ }
TDEProcess p;
p << exe;
@@ -136,6 +138,15 @@ bool XKBExtension::setXkbOptions(const XkbOptions options)
}
}
+ if (p.args().count() < 2)
+ {
+ // Either the user has not configured any Xkb options or these options
+ // are already set and we are in append mode so we want to avoid
+ // duplicates
+ kdWarning() << "[setXkbOptions] No options need to be set" << endl;
+ return true;
+ }
+
kdDebug() << "[setXkbOptions] Command: " << p.args() << endl;
p.start(TDEProcess::Block);