diff options
author | Mavridis Philippe <[email protected]> | 2025-01-13 16:01:19 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2025-01-14 16:41:23 +0200 |
commit | 040ee36ad5ddf0d8f08d30d21976c7d719bea266 (patch) | |
tree | 500d4003a8e9e3bb162aa2939d667d67d114843e | |
parent | 6b55c6514838cb3b8a299cac1b5354addea2eb67 (diff) | |
download | tdebase-040ee36ad5ddf0d8f08d30d21976c7d719bea266.tar.gz tdebase-040ee36ad5ddf0d8f08d30d21976c7d719bea266.zip |
KXkb: do not run setxkbmap without arguments
Signed-off-by: Mavridis Philippe <[email protected]>
-rw-r--r-- | kxkb/extension.cpp | 11 |
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); |