From 152400c1b6880506ee1395011686c2b191f419a0 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Fri, 23 Mar 2018 13:48:12 +0100 Subject: [PATCH] org.freedesktop.PowerManagement.Inhibit should only prevent suspend For preventing screen standby or screen locking the org.freedesktop.ScreenSaver.Inhibit must be used. Both calls erroneously did the same. CHANGELOG: org.freedesktop.PowerManagement.Inhibit will only inhibit suspending the machine now (as per spec), to prevent screen power management use org.freedesktop.ScreenSaver.Inhibit instead Differential Revision: https://phabricator.kde.org/D11182 --- daemon/powerdevilfdoconnector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/powerdevilfdoconnector.cpp b/daemon/powerdevilfdoconnector.cpp index 000406644..cf3f9765f 100644 --- a/daemon/powerdevilfdoconnector.cpp +++ b/daemon/powerdevilfdoconnector.cpp @@ -98,10 +98,10 @@ int FdoConnector::Inhibit(const QString &application, const QString &reason) // Inhibit here means we cannot interrupt the session. // If we've been called from DBus, use PolicyAgent's service watching system if (calledFromDBus()) { - return PolicyAgent::instance()->addInhibitionWithExplicitDBusService((uint)PolicyAgent::ChangeScreenSettings, + return PolicyAgent::instance()->addInhibitionWithExplicitDBusService((uint)PolicyAgent::InterruptSession, application, reason, message().service()); } else { - return PolicyAgent::instance()->AddInhibition((uint)PolicyAgent::ChangeScreenSettings, application, reason); + return PolicyAgent::instance()->AddInhibition((uint)PolicyAgent::InterruptSession, application, reason); } }