~ob/slock

8a7a68c4c09cbc8b03cb2765ac83e99ca1cc808b — Anselm R. Garbe 14 years ago 6e53ce4
applied somwhat similiar patch like Alex Elide proposed
1 files changed, 6 insertions(+), 3 deletions(-)

M slock.c
M slock.c => slock.c +6 -3
@@ 77,9 77,12 @@ main(int argc, char **argv) {
	XDefineCursor(dpy, w, invisible);
	running = XGrabPointer(dpy, RootWindow(dpy, screen), False,
			ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
			GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) == GrabSuccess
		&& XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync,
			 GrabModeAsync, CurrentTime) == GrabSuccess;
			GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) == GrabSuccess;
	len = 10;
	for(len = 10; len && (XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync,
		GrabModeAsync, CurrentTime) != GrabSuccess); len--)
		usleep(1000);
	running = running && (len > 0);
	XMapRaised(dpy, w);
	XSync(dpy, False);