/* init */
passwd[0] = 0;
- while(XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync,
- GrabModeAsync, CurrentTime) != GrabSuccess)
- usleep(1000);
wa.override_redirect = 1;
wa.background_pixel = BlackPixel(dpy, screen);
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,
+ ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
+ GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) == GrabSuccess
+ && XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync,
+ GrabModeAsync, CurrentTime) == GrabSuccess;
XMapRaised(dpy, w);
XSync(dpy, False);
break;
}
}
+ XUngrabPointer(dpy, CurrentTime);
XFreePixmap(dpy, pmap);
XDestroyWindow(dpy, w);
XCloseDisplay(dpy);