screensaver and power manager dbus interfaces

William Jon McCann mccann at jhu.edu
Thu Jun 1 17:20:16 EEST 2006


Hi Rodrigo,

Rodrigo Moya wrote:
> On Wed, 2006-05-31 at 17:48 -0700, Bastian, Waldo wrote:
> 
>>The screensaver interface looks good. What is the use case for the
>>"Poke" method? 
>>
> 
> I guess it can be used by apps like video players to prevent the
> screensaver to fire while showing the movie.

It is possible but not ideal.  A better way is to keep a DBUS connection 
open and use Inhibit method.  The application (eg. video player) gets a 
cookie to use with a later call to UnInhibit.  This cookie allows 
inhibit requests to be reference counted and provides a modicum of 
security.  When the DBUS connection is dropped all inhibitors on that 
connection are removed.

Jon



More information about the xdg mailing list