Inhibit: Forward the correct inhibition flags to PolicyAgent
The Inhibit
method ignored the value of the "flags" argument and
always sent InterruptSession
as inhibition policy. This prevents
sleep, but does not prevent idle actions such as screen locking
and dimming.
This commit changes the requested inhibition policies to match the documented values for "flags":
- Portals "Suspend" remains PolicyAgent
InterruptSession
. - Portals "Idle" becomes PolicyAgent
ChangeScreenSettings
. - Portals "Logout" and "User Switch" are not supported at this time and are merely logged but otherwise ignored.
PowerDevil, which implements the PolicyAgent API, uses the same policies also to represent the logind "sleep" and "idle" inhibitors, so we can trust that they behave accordingly.
Edited by Jakob Petsovits