From: Anselm R Garbe Date: Wed, 9 Apr 2008 22:42:19 +0000 (+0100) Subject: yet another DPMS fix, still trying to prevent the error handler X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=cc36050e44faa01b2783640ffb2323329d15f97d;p=slock.git yet another DPMS fix, still trying to prevent the error handler --- 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);