aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2006-10-18 18:44:19 +0200
committerAnselm R. Garbe <arg@suckless.org>2006-10-18 18:44:19 +0200
commit8a7a68c4c09cbc8b03cb2765ac83e99ca1cc808b (patch)
tree015244f0f5f1c0ceda3b0d7bd9932cee6abfd8b0
parent6e53ce4582cc1cc338028c099108f6f225a7286d (diff)
applied somwhat similiar patch like Alex Elide proposed
-rw-r--r--slock.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/slock.c b/slock.c
index 72afd1e..164a464 100644
--- a/slock.c
+++ b/slock.c
@@ -77,9 +77,12 @@ main(int argc, char **argv) {
77 XDefineCursor(dpy, w, invisible); 77 XDefineCursor(dpy, w, invisible);
78 running = XGrabPointer(dpy, RootWindow(dpy, screen), False, 78 running = XGrabPointer(dpy, RootWindow(dpy, screen), False,
79 ButtonPressMask | ButtonReleaseMask | PointerMotionMask, 79 ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
80 GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) == GrabSuccess 80 GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) == GrabSuccess;
81 && XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync, 81 len = 10;
82 GrabModeAsync, CurrentTime) == GrabSuccess; 82 for(len = 10; len && (XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync,
83 GrabModeAsync, CurrentTime) != GrabSuccess); len--)
84 usleep(1000);
85 running = running && (len > 0);
83 XMapRaised(dpy, w); 86 XMapRaised(dpy, w);
84 XSync(dpy, False); 87 XSync(dpy, False);
85 88