neideck@wsl.dec.com (Burkhard Neidecker) (05/04/91)
I have a question about the behaviour of the ScreenSaver in the server (X11R4 and higher). I have a program that needs to prevent the screen from going blank as long as it receives events (The program couples multiple machines into behaving as a single multiscreen machine). I don't want to touch the parameters of the screensaver (timeout) on the Displays in question, but rather wanted to reset the timer for the screensaver from the program. According to the documentation for XSetScreenSaver(3X11): ... XResetScreenSaver(display) ... If the specified mode is Screen- SaverReset and the screen saver currently is enabled, XFor- ceScreenSaver deactivates the screen saver if it was activated, and the activation timer is reset to its initial state (as if device input had been received). At first I understood the above sentence to mean that whenever I make a call to XResetScreenSaver, the clock starts ticking again, so if timeout is set to 60 seconds, the screen will go blank only 60 seconds after the last call to XResetScreenSaver. What happens instead is that the screen goes blank after 60 seconds, no matter how many calls to XResetScreenSaver have been done, the first call *after* the blanking triggers the timer again and all further calls are ignored again. Reading the sentence above again, I looks to me like it can be interpreted to mean the behaviour I'm seeing. The logic as implemented by the server is if (screen_saver_enabled && screen_saver_activated) { unsafe_screen; retrigger_timer; } whereas the behaviour I wanted was if (screen_saver_enabled) { if (screen_saver_activated) { unsafe_screen; } retrigger_timer; } Did I misinterpret the documentation or is this a server bug ? If it's intentional, what's the reasoning behind this behaviour. It doesn't seem terribly useful to me the way it's now. Burkhard Neidecker-Lutz, CEC Karlsruhe neideck@nestvx.enet.dec.com