Commit ff373197 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

activation: Simplify icon loading logic

(cherry picked from commit b2aacba0)
parent 1c521500
Pipeline #206640 canceled with stage
in 21 seconds
......@@ -75,7 +75,7 @@ QString XdgActivationV1Integration::requestToken(bool isPrivileged, SurfaceInter
QSharedPointer<PlasmaWindowActivationInterface> pwActivation(waylandServer()->plasmaActivationFeedback()->createActivation(appId));
bool showNotify = false;
QIcon icon;
QIcon icon = QIcon::fromTheme(QStringLiteral("system-run"));
if (const QString desktopFilePath = Window::findDesktopFile(appId); !desktopFilePath.isEmpty()) {
KDesktopFile df(desktopFilePath);
Window *window = Workspace::self()->activeWindow();
......@@ -83,11 +83,10 @@ QString XdgActivationV1Integration::requestToken(bool isPrivileged, SurfaceInter
const auto desktop = df.desktopGroup();
showNotify = desktop.readEntry("X-KDE-StartupNotify", desktop.readEntry("StartupNotify", true));
icon = QIcon::fromTheme(df.readIcon(), QIcon::fromTheme(QStringLiteral("system-run")));
icon = QIcon::fromTheme(df.readIcon(), icon);
m_currentActivationToken.reset(new ActivationToken{newToken, isPrivileged, surface, serial, seat, appId, showNotify, pwActivation});
if (showNotify) {
const auto icon = QIcon::fromTheme(Window::iconFromDesktopFile(appId), QIcon::fromTheme(QStringLiteral("system-run")));
Q_EMIT effects->startupAdded(m_currentActivationToken->token, icon);
return newToken;
Supports Markdown
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