summaryrefslogtreecommitdiff
path: root/slock.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-04-09 23:42:19 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-04-09 23:42:19 +0100
commitcc36050e44faa01b2783640ffb2323329d15f97d (patch)
treedd4b64a267617c56cfd8a87132180c0b2decaec4 /slock.c
parent049ccf9a906dd9d4b261d3e9bb4166eaadb62731 (diff)
downloadslock-cc36050e44faa01b2783640ffb2323329d15f97d.tar.gz
slock-cc36050e44faa01b2783640ffb2323329d15f97d.tar.xz
yet another DPMS fix, still trying to prevent the error handler
Diffstat (limited to 'slock.c')
-rw-r--r--slock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/slock.c b/slock.c
index 0116c70..12cd8ee 100644
--- a/slock.c
+++ b/slock.c
@@ -125,8 +125,10 @@ main(int argc, char **argv) {
/* main event loop */
while(running && !XNextEvent(dpy, &ev)) {
- if(len == 0 && DPMSCapable(dpy))
+ if(len == 0 && DPMSCapable(dpy)) {
+ DPMSEnabled(dpy);
DPMSForceLevel(dpy, DPMSModeOff);
+ }
if(ev.type == KeyPress) {
buf[0] = 0;
num = XLookupString(&ev.xkey, buf, sizeof buf, &ksym, 0);