Don't create Plasma activation feedback if StartupNotify is false

Prevents a spinning circle in the task manager for such tasks.

cc @nicolasfella
This commit is contained in:
Bharadwaj Raju 2023-04-17 14:56:09 +00:00 committed by Vlad Zahorodnii
parent 28c2dd9afe
commit 8e7aab901b

View file

@ -104,7 +104,11 @@ QString XdgActivationV1Integration::requestToken(bool isPrivileged, SurfaceInter
}
icon = QIcon::fromTheme(df.readIcon(), icon);
}
m_currentActivationToken.reset(new ActivationToken{newToken, isPrivileged, surface, serial, seat, appId, showNotify, waylandServer()->plasmaActivationFeedback()->createActivation(appId)});
std::unique_ptr<KWaylandServer::PlasmaWindowActivationInterface> activation;
if (showNotify) {
activation = waylandServer()->plasmaActivationFeedback()->createActivation(appId);
}
m_currentActivationToken.reset(new ActivationToken{newToken, isPrivileged, surface, serial, seat, appId, showNotify, std::move(activation)});
if (showNotify) {
Q_EMIT effects->startupAdded(m_currentActivationToken->token, icon);
}