aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-09-02 11:49:02 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-09-02 11:49:02 +0200
commita55594fdd69fcfcc10b8c9624d5aba298969d713 (patch)
tree5acc3228563b71a2c412c3ca691699b7aeb466f5
parent03a87179919eebab7d38c548e3ff8e2911512468 (diff)
increasing for loops are idiomatic
-rw-r--r--slock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/slock.c b/slock.c
index 83d426a..08ada6f 100644
--- a/slock.c
+++ b/slock.c
@@ -274,7 +274,7 @@ lockscreen(Display *dpy, int screen)
274 XDefineCursor(dpy, lock->win, invisible); 274 XDefineCursor(dpy, lock->win, invisible);
275 275
276 /* Try to grab mouse pointer *and* keyboard for 600ms, else fail the lock */ 276 /* Try to grab mouse pointer *and* keyboard for 600ms, else fail the lock */
277 for (i = 6, ptgrab = kbgrab = -1; i; --i) { 277 for (i = 0, ptgrab = kbgrab = -1; i < 6; i++) {
278 if (ptgrab != GrabSuccess) { 278 if (ptgrab != GrabSuccess) {
279 ptgrab = XGrabPointer(dpy, lock->root, False, 279 ptgrab = XGrabPointer(dpy, lock->root, False,
280 ButtonPressMask | ButtonReleaseMask | 280 ButtonPressMask | ButtonReleaseMask |