Bug 98615

Summary: Add screensaver inhibition monitor to xdg-screensaver
Product: Portland Reporter: Reuben Thomas <rrt>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Reuben Thomas 2016-11-06 17:38:57 UTC
It would be useful to be able to monitor the state of screensaver inhibition. xdg-screensaver provides the ability to find the current status, but that's only enough to write a polling implementation.

However, most modern desktops, using D-Bus, allow for a "push" implementation, where a client can listen for inhibition state changes.

It would be good to abstract this in xdg-screensaver.

Suggestion:

xdg-screensaver status-listen

starts a process that listens for changes to the status, and reports them on stdout. The parent can then take appropriate action.

Motivating case: I'd like to be able to add this function to caffeine-indicator (so that the indicator correctly indicates the status of the whole desktop, not just whether it is itself inhibiting the screensaver), without either inefficient polling that is not necessary, or reimplementation of code already mostly present in xdg-screensaver.
Comment 1 Rex Dieter 2017-02-28 15:09:29 UTC
While nice in some circumstances, I don't think this suggestion will ever get implemented, sorry.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.