Rumours says, that XSetScreenSaver() accepts int's as timeout and interval arguments. In fact, these values are limited to signed short int: xc/lib/X11/SetSSaver.c: int XSetScreenSaver(dpy, timeout, interval, prefer_blank, allow_exp) register Display *dpy; int timeout, interval, prefer_blank, allow_exp; { register xSetScreenSaverReq *req; LockDisplay(dpy); GetReq(SetScreenSaver, req); req->timeout = timeout; req->interval = interval; req->preferBlank = prefer_blank; req->allowExpose = allow_exp; UnlockDisplay(dpy); SyncHandle(); return 1; } xc/include/Xproto.h: typedef struct { CARD8 reqType; BYTE pad; CARD16 length B16; INT16 timeout B16, interval B16; BYTE preferBlank, allowExpose; CARD16 pad2 B16; } xSetScreenSaverReq; INT16 and B16 are defined in xc/include/Xmd.h Steps to reproduce: $ xset s 43200 0 X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 107 (X_SetScreenSaver) Value in failed request: 0xffffa8c0 Serial number of failed request: 8 Current serial number in output stream: 9 43200 - timeout value (12 hours), 0xffffa8c0 - 43200 (0x0000a8c0) threated as signed short value.
can't really change the function signature, so this is really a doc bug against Xlib.
Can xSetScreenSaverReq.timeout and xSetScreenSaverReq.interval be safely changed to unsigned? Or XSetScreenSaver() should check it's arguments...
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Manpage note about this issue is pushed. Clearing blocker status, since I don't think it is a legitimate blocker anyway.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.