Preventing screensaver when playing movie?

David Sharp whereami at gmail.com
Tue Mar 4 19:00:22 PST 2008


On Tue, Mar 4, 2008 at 3:42 PM, Graeme Gill <graeme2 at argyllcms.com> wrote:
> Erik wrote:
>
>  > I sure hope not! It would leave the system in a broken state if mplayer
>  > is killed before it reaches the point when it turns DPMS on again. No
>  > application program should ever use commands like that. Only
>
>  Nice in theory, but not all the screensaver API's support this approach.
>  To be able to follow that approach you need a light weight
>  (ie. calling it doesn't chew resources) programmatic means
>  of (ideally) holding the counter reset for a set period of time.
>
>  None of the various screen/power savers have such an API.
>  Some have a reset call, but you don't know how often you
>  have to call it. You just have to hope that the timeout is
>  longer than you need the display between each call to the reset.
>
>  DPMS doesn't have either, it's got:
>
>   DPMSQueryExtension
>   DPMSGetVersion
>   DPMSCapable
>   DPMSSetTimeouts
>   DPMSGetTimeouts
>   DPMSEnable
>   DPMSDisable
>   DPMSForceLevel
>   DPMSInfo
>
>  None of those say they will reset the counter.
>
>  Now some of the other calls may reset DPMS as a side effect,
>  (XResetScreenSaver ?) but it doesn't seem to be documented.
>
>  The XScreenSaver extension doesn't have a reset either, it's
>  got a XScreenSaverSuspend(bool) (that does control DPMS as well),
>  that stops and starts it. If the the connection between client
>  and server breaks, the countdown continues though. So using
>  this won't allow the DPMS to start if you pause a movie etc.
>  (which may or may not be what the user actually wants), but
>  it does allow an application to disable things in a fail-safe
>  way.

Can't the client call XScreenSaverSuspend(False) on pause to re-enable
the counter?

>
>  Graeme Gill.
>
>
> _______________________________________________
>  xorg mailing list
>  xorg at lists.freedesktop.org
>  http://lists.freedesktop.org/mailman/listinfo/xorg
>



More information about the xorg mailing list