From 0b0aae7761c3097b6fe10e79ad192eb47e50c45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 26 Oct 2016 08:10:04 +0200 Subject: [PATCH] Pass a desktopfile name to kcmshell5 Summary: In order to have a proper window icon for kcmshell5 on Wayland KWin needs to pass a desktop file name as command line argument. The desktop file of kwinfocus is used as it uses the preferences-system-windows icon which is also the icon on X11. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D3162 --- useractions.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/useractions.cpp b/useractions.cpp index 5432fd8abd..7cdda8db91 100755 --- a/useractions.cpp +++ b/useractions.cpp @@ -329,7 +329,13 @@ void UserActionsMenu::init() [this]() { // opens the KWin configuration QStringList args; - args << QStringLiteral("--icon") << QStringLiteral("preferences-system-windows") << configModules(false); + args << QStringLiteral("--icon") << QStringLiteral("preferences-system-windows"); + const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, + QStringLiteral("kservices5/kwinfocus.desktop")); + if (!path.isEmpty()) { + args << QStringLiteral("--desktopfile") << path; + } + args << configModules(false); QProcess *p = new Process(this); p->setArguments(args); p->setProcessEnvironment(kwinApp()->processStartupEnvironment());