XSetScreenSaver()XSetScreenSaver()NameXSetScreenSaver – set the parameters of the screen saver.
Synopsis
XSetScreenSaver(display, timeout, interval, prefer_blanking,
allow_exposures)
Display *display;
int timeout, interval;
int prefer_blanking;
int allow_exposures;
Arguments
display Specifies a connection to an X server; returned from
XOpenDisplay().
timeout Specifies the time of inactivity, in seconds, before the
screen saver turns on.
interval Specifies the interval, in seconds, between screen saver
invocations. This is for intermittent changes to the dis‐
play, not blanking.
prefer_blanking
Specifies whether to enable screen blanking. Possible values
are DontPreferBlanking, PreferBlanking, or DefaultBlanking.
allow_exposures
Specifies the current screen saver control values. Possible
values are DontAllowExposures, AllowExposures, or DefaultEx‐
posures.
DescriptionXSetScreenSaver() sets the parameters that control the screen saver.
timeout and interval are specified in seconds. A positive timeout
enables the screen saver. A timeout of zero (0) disables the screen
saver, while a timeout of -1 restores the default. An interval of zero
(0) disables the random pattern motion. If no input from devices (key‐
board, mouse, etc.) is generated for the specified number of timeout
seconds, the screen saver is activated.
For each screen, if blanking is preferred and the hardware supports
video blanking, the screen will simply go blank. Otherwise, if either
exposures are allowed or the screen can be regenerated without sending
exposure events to clients, the screen is tiled with the root window
background tile, with a random origin, each interval seconds. Other‐
wise, the state of the screen does not change. All screen states are
restored at the next input from a device.
If the server-dependent screen saver method supports periodic change,
interval serves as a hint about how long the change period should be,
and a value of zero (0) hints that no periodic change should be made.
Examples of ways to change the screen include scrambling the color map
periodically, moving an icon image about the screen periodically, or
tiling the screen with the root window background tile, randomly reo‐
riginated periodically.
For more information on the screen saver, see Volume One, Chapter 15,
Other Programming Techniques.
Errors
BadValue timeout < -1.
See AlsoXActivateScreenSaver(), XForceScreenSaver(), XGetScreenSaver(), XRe‐
setScreenSaver().
Xlib - Screen Saver XSetScreenSaver()