Smarter Screen saver

Thomas Beckett thomas.beckett at gmail.com
Thu Sep 22 04:24:58 CDT 2005


On 9/21/05, Tristan Wibberley <maihem at maihem.org> wrote:
> Vincent Trouilliez wrote:
> > On Tue, 2005-09-20 at 23:04 +0200, Sami Dalouche wrote:
> >
> >>Well, in the case totem crashes, the lock would never been removed, I'm not sure
> >>this idea is the killer-idea, but there definitely must be a way to accomplish
> >>this easily..
> >
> >
> > Please forgive my ignorance, but I thought this 'D-bus' messaging system
> > in Gnome was precisely supposed to serve that kind of purpose : let
> > programs pass/share messages to other programs ?
> >
> > Can't Totem etc, just broadcast a message saying:
> >
> > "hi, just in case there is a screensaver out there, I am currently
> > playing a movie, so please don't trigger the screen saver"
>
> I dunno, I think it would be nicer if the screensaver daemon asked the
> window manager if it was okay, then applications could set an attribute
> on any and all windows that should keep the screensaver at bay. That way
> the window manager could keep a count of the number of toplevel windows
> that were preventing the screensaver, and when the screensaver asks the
> window manager it gets a zero ("okay to start"), or nonzero ("don't
> start"). If an application dies or any window closes, the count goes
> down automatically (from the point of view of the applications).
>
> This would need a small extension to the window manager standards, but
> freedesktop could specify that quite easily, and Ubuntu may be able to
> add a non-standard attribute in a safe namespace (I don't know how the
> window manager standards are structured) for programs that ship with it.
>
> --
> Tristan Wibberley
>
> Opinions expressed are my own and do not necessarily coincide with those
> of my employer, etc.

I think DBus would definately be the best way as it is designed for a
general purpose essage bus. As i responded yesterday (tothe user
rather than the list - stupid gmail reply)


But that would require the screensaver to know every proram that is
used where user inactivity should not trigger the screensaver. A
better solution would be to have the screensaver listen on the dbus
for a SCREENSAVER_POSTPONE message, maybe with a time to postpone for
(playtime of movie etc).The screensaver would then be disabled from
running for that time or until a SCREENSAVER_RESUME was sent when the
user stops the film. This would then shift the burden of supporting it
to the programs that actually want to postpone the screensaver which
would be much better in my view. Is this viable or is it a bit
overkill for the screensaver?

The idea for the postpone time was that if the player did crash before
the film or whatever you are doing finishes then the resume signal
would not need to be issued, it would wake itself up.

Tom



More information about the ubuntu-devel mailing list