changeset: 19:fc0815897dcc
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Wed Feb 21 21:25:53 2007 +0100
summary: made slock more aggressive, DenisG please recheck
diff -r 540ebd7b3d7b -r fc0815897dcc config.mk
--- a/config.mk Thu Feb 01 13:52:36 2007 +0100
+++ b/config.mk Wed Feb 21 21:25:53 2007 +0100
@@ -1,5 +1,5 @@
# slock version
-VERSION = 0.4
+VERSION = 0.5
# Customize below to fit your system
diff -r 540ebd7b3d7b -r fc0815897dcc slock.c
--- a/slock.c Thu Feb 01 13:52:36 2007 +0100
+++ b/slock.c Wed Feb 21 21:25:53 2007 +0100
@@ -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);
Received on Wed Feb 21 2007 - 21:27:14 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:39 UTC