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

xdgactivation: Properly prevent disabled activation notifications

The logic when checking the settings was wrong and it would always
notify unless both keys were actually disabled.

BUG: 454937

(cherry picked from commit 78d80123)
parent 75b00794
Pipeline #199896 passed with stage
in 25 minutes and 24 seconds
......@@ -79,8 +79,10 @@ QString XdgActivationV1Integration::requestToken(bool isPrivileged, SurfaceInter
if (const QString desktopFilePath = Window::findDesktopFile(appId); !desktopFilePath.isEmpty()) {
KDesktopFile df(desktopFilePath);
Window *window = Workspace::self()->activeWindow();
showNotify = (!window || appId != window->desktopFileName())
&& (df.desktopGroup().readEntry("StartupNotify", true) || df.desktopGroup().readEntry("X-KDE-StartupNotify", true));
if (!window || appId != window->desktopFileName()) {
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")));
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