From: Niccolò Venerandi Date: Mon, 2 Jun 2025 11:35:03 +0000 (+0000) Subject: [PATCH] Do not show logout screen when in lockscreen / screensaver X-Git-Tag: archive/raspbian/4%6.3.6-2+rpi1^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=16e4edb8c10d3a031b344e3330d24646a0068d26;p=plasma-workspace.git [PATCH] Do not show logout screen when in lockscreen / screensaver BUG:504575 (cherry picked from commit ba7a8c16b7934fa23d3a44bb38667554e39996b7) Co-authored-by: Niccolò Venerandi Gbp-Pq: Name upstream_f1605df4_Do-not-show-logout-screen-when-in-lockscreen-screensaver.patch --- diff --git a/libkworkspace/sessionmanagement.cpp b/libkworkspace/sessionmanagement.cpp index 43a21259..248147f5 100644 --- a/libkworkspace/sessionmanagement.cpp +++ b/libkworkspace/sessionmanagement.cpp @@ -148,11 +148,18 @@ void SessionManagement::requestLogoutPrompt() return; } - // Don't bother to check for whether the user normally wants confirmation or - // not; if this function was invoked, it means they do want to see the logout - // prompt right now - LogoutPromptIface iface; - lockQuitUntilFinished(iface.promptAll()); + OrgFreedesktopScreenSaverInterface ifaceScreenSaver(QStringLiteral("org.freedesktop.ScreenSaver"), + QStringLiteral("/ScreenSaver"), + QDBusConnection::sessionBus()); + + // Do not show Logoup prompt when in the lockscreen / screensaver + if (!ifaceScreenSaver.GetActive()) { + // Don't bother to check for whether the user normally wants confirmation or + // not; if this function was invoked, it means they do want to see the logout + // prompt right now + LogoutPromptIface iface; + lockQuitUntilFinished(iface.promptAll()); + } } void SessionManagement::requestShutdown(ConfirmationMode confirmationMode)