Handle apps which set the desktopFileName property with filename suffix

Reviewers: #plasma, broulik, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21097
parent e435d31f
......@@ -116,11 +116,17 @@ void X11Integration::installDesktopFileName(QWindow *w)
return;
}
if (QGuiApplication::desktopFileName().isEmpty()) {
QString desktopFileName = QGuiApplication::desktopFileName();
if (desktopFileName.isEmpty()) {
return;
}
// handle apps which set the desktopFileName property with filename suffix,
// due to unclear API dox (https://bugreports.qt.io/browse/QTBUG-75521)
if (desktopFileName.endsWith(QLatin1String(".desktop"))) {
desktopFileName.chop(8);
}
NETWinInfo info(QX11Info::connection(), w->winId(), QX11Info::appRootWindow(), NET::Properties(), NET::Properties2());
info.setDesktopFileName(QGuiApplication::desktopFileName().toUtf8().constData());
info.setDesktopFileName(desktopFileName.toUtf8().constData());
}
void X11Integration::setWindowProperty(QWindow *window, const QByteArray &name, const QByteArray &value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment