[Portland] xdg-screensaver.in

Bryce Harrington bryce at osdl.org
Tue May 9 17:15:10 PDT 2006


On Tue, May 09, 2006 at 04:50:07PM -0600, Aaron J. Seigo wrote:
> On Tuesday 09 May 2006 16:02, Bryce Harrington wrote:
> > Looking at the xset source code[2], it looks like we need an X routine
> > like XActivateScreenSaver()[3] but that returns the current saver state
> > instead of setting it.  Does XGetScreenSaver return this info in one of
> > its args?
> 
> apparently if the timeouts given by XGetScreenSaver are 0 then the screensaver 
> is off. otherwise it's on.

Ah, okay...  Next question is, are there any existing cmdline tools that
return this value?  If not, should I make a little one to include with
xdg-utils?  Obviously, it'd be in C, so I'm not sure if that's keeping
with the "just scripts" philosophy, but it'd only be used by the test
harness.  (Although, on reflection, if there isn't any other existing
way to query the screensaver state, that might actually be a very handy
feature for apps to gain from xdg-screensaver.)

> talking to one of the kde/x.org guys (frederik), he noted that while this 
> works it's pretty hacky and that at some point it needs to be fixed properly 
> in x.org. they've recently added the ability to programmatically (and safely) 
> block the screensaver w/out resorting to doing things like faking key events, 
> but even that hasn't made it into an official release yet. xscreesaver is 
> still a bit of a mess =)

I haven't tested xdg-screensaver super thoroughly, but so far it looks
like it is able to suspend the screensaver effectively, without faking
keyboard events.  (I did run across some C code that'd do this, though,
but left that a plan B for now...)

Bryce



More information about the Portland mailing list