Hi, Muttley
On Sat, 29 Jul 2023 15:30:41 +0000, Muttley wrote:
> On Sat, 29 Jul 2023 15:08:57 -0000 (UTC)
> Lew Pitcher <
lew.p...@digitalfreehold.ca> wrote:
>>On Sat, 29 Jul 2023 09:23:25 +0000, Muttley wrote:
>>
>>> Does 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
OK, so I'm a beginner at X11/Xlib progamming myself, so I don't
have all (or even most) of the answers. What I can tell you is
that you use the Xss(3) extensions in an X11 client program that
runs in the background and intercepts and processes screensaver
events. It runs as a stand-alone process, and is not integrated
into the X11 server.
So, the screensaver client will have to draw on something called
a "Drawable" (which can be a "Window" or a "Pixmap") which it
tells the Xss(3) extension should be used as the screensaver
image. It's up the the client to establish this Drawable, and
to actually draw the image. This you can do with the usual
XLib calls. The client does this drawing (or stops drawing)
when it receives a ScreenSaverNotify event in it's event loop.
I can think of more to say, but I'd just be guessing. As this
is your project, I'll defer to your lead.