On Sat, 29 Jul 2023 15:08:57 -0000 (UTC)
Post by Lew PitcherPost by M***@dastardlyhq.comDoes anyone know how the 2 seperate Xlib APIs that deal with the screen saver
work together?
There's the core built in API with functions such as XSetScreenSaver() and
the API found in the X11/extensions/scrnsaver.h and I can't figure out if
they're seperate subsystems or they somehow interact.
From a quick reading of the XSetScreenSaver(3) and Xss(3) manual pages
it appears that
a) XSetScreenSaver() is part of the core X11 implementation, and that it
"saves the screen" by simply blanking it, or overlaying it with an
implementation-defined graphic, and
b) the Xss(3) functions are implemented as an optional X11 extension,
and provide facilities to hook a application-defined drawing code
into the basic X11 screensaver code that XSetScreenSaver() uses.
Thus, the Xss(3) functions are an optional layer that replaces the
single XSetScreenSaver() call
But I'm not sure it does. I've been reading this:
https://www.x.org/releases/X11R7.7/doc/scrnsaverproto/saver.html
And you get sentences such as this for XScreenSaverSetAttributes():
"this routine sets the attributes to be used the next time the external screen
saver is activated."
What external screen saver? The X built in or something else? Also Drawable is
a parameter to a number of functions but it doesn't say if you have to create
it yourself or its provided by the X server? For example some sentences are
is confusing me such as this one:
"If the server chooses the latter approach, a window with a special identifier
is created and mapped at the top of the stacking order where it remains until
the screen saver deactivates"
Great, but where does the window come from? Does the server create it or do
I - is it passed to me as a Drawable argument but if so why is it an
attribute in XScreenSaverSetAttributes() ?
As usual with Xlib, things are rather vague. I suppose it'll be a case of
suck it and see.