diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/XScrnSaver.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/XScrnSaver.c b/src/XScrnSaver.c index 3727ae4..d6ed0f4 100644 --- a/src/XScrnSaver.c +++ b/src/XScrnSaver.c @@ -439,4 +439,22 @@ Status XScreenSaverGetRegistered (dpy, screen, xid, type) XFree ((char *) ulp); } return retval; -} +} + +void +XScreenSaverSuspend (Display *dpy, Bool suspend) +{ + XExtDisplayInfo *info = find_display (dpy); + xScreenSaverSuspendReq *req; + + ScreenSaverSimpleCheckExtension (dpy, info); + + LockDisplay (dpy); + GetReq (ScreenSaverSuspend, req); + req->reqType = info->codes->major_opcode; + req->saverReqType = X_ScreenSaverSuspend; + req->suspend = suspend; + UnlockDisplay (dpy); + SyncHandle (); +} + |