diff options
author | Anselm R. Garbe <arg@suckless.org> | 2007-02-21 21:25:53 +0100 |
---|---|---|
committer | Anselm R. Garbe <arg@suckless.org> | 2007-02-21 21:25:53 +0100 |
commit | ae8cce24d3eb590c3cc810eb8487296ee1db0718 (patch) | |
tree | c9adffa0d01517cb62ef5e5939ac71a66ce9c3d8 /slock.c | |
parent | 663fdb326a573ed8e4a5e47a6d8459b2f479b75f (diff) | |
download | slock-ae8cce24d3eb590c3cc810eb8487296ee1db0718.tar.gz slock-ae8cce24d3eb590c3cc810eb8487296ee1db0718.tar.xz |
made slock more aggressive, DenisG please recheck
Diffstat (limited to 'slock.c')
-rw-r--r-- | slock.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -86,13 +86,14 @@ main(int argc, char **argv) { pmap = XCreateBitmapFromData(dpy, w, curs, 8, 8); invisible = XCreatePixmapCursor(dpy, pmap, pmap, &black, &black, 0, 0); XDefineCursor(dpy, w, invisible); - running = XGrabPointer(dpy, RootWindow(dpy, screen), False, + for(len = 1000; len && (XGrabPointer(dpy, RootWindow(dpy, screen), False, ButtonPressMask | ButtonReleaseMask | PointerMotionMask, - GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) == GrabSuccess; - len = 10; - for(len = 10; len && (XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync, + GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) != GrabSuccess); len--) + usleep(1000); + running = running && (len > 0); + for(len = 1000; len && (XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync, GrabModeAsync, CurrentTime) != GrabSuccess); len--) - usleep(10000); + usleep(1000); running = running && (len > 0); len = 0; XMapRaised(dpy, w); |