Preventing screensaver when playing movie?
graeme2 at argyllcms.com
Thu Mar 6 17:44:19 PST 2008
Lubos Lunak wrote:
> They're broken? You can of course add workarounds if you consider them
> important enough ... but ... what is this discussion about right now? The
> original problem's been solved, it's been concluded that some screensavers
> are broken and need workarounds, so what's missing now?
In you're opinion they are broken, but apparently not according
to their authors. I'd tend to agree with you.
As for "if they are important enough", you may as well not
bother trying to deal with screensavers at all if you're not dealing
with what are probably the two most popular ones, gnome-screensaver
Personally I would have hoped that the authors of these screensavers
would be sufficiently embarrassed by their lack of compatibility
that they would fix them, but apparently not.
>>Not so simple. My app needs the display long enough to do it's stuff
>>(take a measurement). It takes a certain amount of time. Without an
>>assurance that the screensaver won't kick in during that period,
>>it's an uncertain solution (although it will work when sane time-out
>>values are set in the system).
> Given that XResetScreenSaver should cost next to nothing, and whatever it is
> that applications does that needs to remain visibile, it should be perfectly
> fine to call XResetScreenSaver once per every 10 seconds. It's not going to
> drain your laptop power any faster.
Your assuming that the display won't blank in 10 seconds. It would
be a better designed API if no such assumptions had to be made.
You're assuming that my application can somehow do this every
10 seconds. In fact it might be busy doing the things it does,
rather than having to somehow stop what it's doing every
10 seconds to tickle the screensaver, just in case it
is going to time out. A better API would eliminate these
> API that's formally correct? I don't think that exists in practice, at least
> not together with API that's usable (not to mention that in this specific case
> you usually don't know what N is, so there goes your perfect API designing).
As the application that is asking for the screensaver to reset, I
have a lot more clue than the screensaver, or the person
who set the screensaver timeout. And if I get it wrong,
that's my fault and something I can fix, rather than simply hoping
that it won't time out.
> XResetScreenSaver() works and is good enough, what do you want more?
I'm suggesting that while it works OK in practice, it hasn't been
though out as well as it might, and so the lesson should be learnt
for next time someone wants to invent a new screensaver API
(or perhaps update the current extension).
The change is rather trivial.
> If I'm not mistaken, X11 extensions are written in a way to care about
> backwards compatibility and they even into core functionality if necessary.
That sounds nice, but who knows how it really works unless there's
something written that indicates it ?
More information about the xorg