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
This commit is contained in:
Martin Gräßlin 2016-10-26 08:10:04 +02:00
parent f792c82528
commit 0b0aae7761

View file

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