summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2006-03-31 18:43:09 +0000
committerFredrik Höglund <fredrik@kde.org>2006-03-31 18:43:09 +0000
commita183fb1a70d48155b67d98fb4e4aaca825842f12 (patch)
tree2fd8613736b7a02068482ec3666bb369d416f970 /src
parent8bc4acacd1079637be310b71fb5b74a5b0717cc2 (diff)
Update the package version number to 1.1. Require scrnsaverproto >= 1.1.libXScrnSaver-1_1_0XORG-7_1XORG-7_0_99_901
Update the manpage to document the new XScreenSaverSuspend function. Add the implementation of XScreenSaverSuspend.
Diffstat (limited to 'src')
-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 ();
+}
+