[MPlayer-dev-eng] [PATCH] Use XScreenSaverSuspend if supported

Adam Tlałka atlka at pg.gda.pl
Fri Dec 21 08:00:49 CET 2007


Welcome,

more about XScreenSaverSuspend below (from man):

 If XScreenSaverSuspend is called multiple times  with  suspend  set  to
’True’,  it must be called an equal number of times with suspend set to
’False’ in order for  the  screensaver  timer  to  be  restarted.  This
request has no affect if a client tries to resume the screensaver
without first having suspended it.  XScreenSaverSuspend  can  thus  not
be used  by one client to resume the screensaver if it’s been suspended
by another client.

If a client that has suspended  the  screensaver  becomes  disconnected
from  the  X  server,  the  screensaver  timer  will  automatically  be
restarted, unless it’s still suspended by  another  client.

a) Suspending the screensaver timer doesn’t prevent the screensaver from
being forceably activated with the ForceScreenSaver request, or a DPMS
mode  from  being set with the DPMSForceLevel request.

b) XScreenSaverSuspend  also doesn’t deactivate the screensaver or DPMS
if either is active at the time the request to suspend them is received
by the  X  server. But once they’ve been deactivated, they won’t
automatically be activated again, until the client has canceled the
suspension.

So while using XScreenSaverSuspend according to a) screensaver could be
forcibly activated by other app and as stated in b) XScreenSaverSuspend
call will not deactivate already active screen saving mode - so if you
start mplayer from some script there will be no screen saver
deactivation.

Periodic XResetScreenSaver calling is better IMHO because it always
deactivates screensaver mode. Even one call per second for example
doesn't look as a heavy job and should work in any case ;).
But it should be tested of course (DPMS and blanking deactivation works
for sure but I don't know about KDE screensaver program).

Regards
-- 
Adam Tlałka       mailto:atlka at pg.gda.pl    ^v^ ^v^ ^v^
System  & Network Administration Group       - - - ~~~~~~
Computer Center, Gdańsk University of Technology, Poland
PGP public key:   finger atlka at sunrise.pg.gda.pl





More information about the MPlayer-dev-eng mailing list