pinosaur
/
slock.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03a8717
)
increasing for loops are idiomatic
author
Markus Teich
<markus.teich@stusta.mhn.de>
Fri, 2 Sep 2016 09:49:02 +0000
(11:49 +0200)
committer
Markus Teich
<markus.teich@stusta.mhn.de>
Fri, 2 Sep 2016 09:49:02 +0000
(11:49 +0200)
slock.c
patch
|
blob
|
history
diff --git
a/slock.c
b/slock.c
index
83d426a
..
08ada6f
100644
(file)
--- a/
slock.c
+++ b/
slock.c
@@
-274,7
+274,7
@@
lockscreen(Display *dpy, int screen)
XDefineCursor(dpy, lock->win, invisible);
/* Try to grab mouse pointer *and* keyboard for 600ms, else fail the lock */
- for (i =
6, ptgrab = kbgrab = -1; i; --i
) {
+ for (i =
0, ptgrab = kbgrab = -1; i < 6; i++
) {
if (ptgrab != GrabSuccess) {
ptgrab = XGrabPointer(dpy, lock->root, False,
ButtonPressMask | ButtonReleaseMask |