Commit e04d9e19 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.
parent 56d3b2dd
Pipeline #197965 failed with stage
in 34 minutes and 28 seconds
......@@ -77,7 +77,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, waylandServer()->plasmaActivationFeedback()->createActivation(appId)});
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