Commit ea2ec217 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Vlad Zahorodnii
Browse files

xdgactivation: Do not notify when applications try to activate themselves

There are some cases where this might happen, there's not much to
notify there anyway as it's more of an implementation detail.


(cherry picked from commit e04d9e19)
parent b079c8ca
Pipeline #197982 passed with stage
in 40 minutes and 30 seconds
......@@ -78,7 +78,9 @@ QString XdgActivationV1Integration::requestToken(bool isPrivileged, SurfaceInter
QIcon icon;
if (const QString desktopFilePath = Window::findDesktopFile(appId); !desktopFilePath.isEmpty()) {
KDesktopFile df(desktopFilePath);
showNotify |= df.desktopGroup().readEntry("StartupNotify", true) || df.desktopGroup().readEntry("X-KDE-StartupNotify", true);
Window *window = Workspace::self()->activeWindow();
showNotify = (!window || appId != window->desktopFileName())
&& (df.desktopGroup().readEntry("StartupNotify", true) || df.desktopGroup().readEntry("X-KDE-StartupNotify", true));
icon = QIcon::fromTheme(df.readIcon(), QIcon::fromTheme(QStringLiteral("system-run")));
}
m_currentActivationToken.reset(new ActivationToken{newToken, isPrivileged, surface, serial, seat, appId, showNotify, pwActivation});
......
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