Ping

There was an extra space after 'noff', below is the updated patch.

On Tue, Feb 23, 2021 at 11:11:21AM +0100, Alex Raschi wrote:
> Hi,
> 
> I noticed that xlock does not allow values between 30 and 0 for options
> -dpms{standby,suspend,off}, the man page suggests that all values >= 0
> are accepted. I use the blank mode and i would like to set a lower
> timeout so i made a patch to remove the limit.
> 
> ok?

Index: app/xlockmore/xlock/xlock.c
===================================================================
RCS file: /cvs/xenocara/app/xlockmore/xlock/xlock.c,v
retrieving revision 1.2
diff -u -p -r1.2 xlock.c
--- app/xlockmore/xlock/xlock.c 26 Nov 2006 17:13:23 -0000      1.2
+++ app/xlockmore/xlock/xlock.c 20 Feb 2021 15:37:47 -0000
@@ -624,7 +624,6 @@ extern int  XHPEnableReset(Display * dsp
 
 #endif
 #ifdef USE_DPMS
-#define MIN_DPMS 30            /* 30 second minimum */
 #if 1
 #include <X11/Xmd.h>
 #include <X11/Xdmcp.h>
@@ -1114,9 +1113,9 @@ SetDPMS(Display * display, int nstandby,
                        DPMSSetTimeouts(display, standby, suspend, off);
                else
                        DPMSSetTimeouts(display,
-                                       (nstandby <= 0 ? 0 : (nstandby > 
MIN_DPMS ? nstandby : MIN_DPMS)),
-                                       (nsuspend <= 0 ? 0 : (nsuspend > 
MIN_DPMS ? nsuspend : MIN_DPMS)),
-                                       (noff <= 0 ? 0 : (noff > MIN_DPMS ? 
noff : MIN_DPMS)));
+                                       (nstandby <= 0 ? 0 : nstandby),
+                                       (nsuspend <= 0 ? 0 : nsuspend),
+                                       (noff <= 0 ? 0 : noff));
        }
 }

Reply via email to