Skip to content

Commit

Permalink
org.freedesktop.PowerManagement.Inhibit should only prevent suspend
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kbroulik committed Mar 23, 2018
1 parent 8ba04f8 commit 152400c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon/powerdevilfdoconnector.cpp
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 152400c

Please sign in to comment.