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.
This commit is contained in:
Aleix Pol Gonzalez 2022-07-01 13:07:12 +00:00 committed by Vlad Zahorodnii
parent 56d3b2ddc4
commit e04d9e1978

View file

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