summaryrefslogtreecommitdiff
path: root/src/XScrnSaver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XScrnSaver.c')
-rw-r--r--src/XScrnSaver.c20
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 ();
+}
+