Introduction
Introduction Statistics Contact Development Disclaimer Help
grab on the slock window instead on the root window - slock - simple X display …
git clone git://git.suckless.org/slock
Log
Files
Refs
README
LICENSE
---
commit 8322f22871ee1da82546dfcdea484ef9db6d4942
parent d83a9a1d01fb70df9859ea231c8d7a2fb898c1e7
Author: Anselm R. Garbe <[email protected]>
Date: Fri, 2 Mar 2007 21:50:05 +0100
grab on the slock window instead on the root window
Diffstat:
M slock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/slock.c b/slock.c
@@ -86,15 +86,16 @@ 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);
+ XMapRaised(dpy, w);
for(len = 1000; len; len--) {
- if(XGrabPointer(dpy, root, False, ButtonPressMask | ButtonRele…
+ if(XGrabPointer(dpy, w, False, ButtonPressMask | ButtonRelease…
GrabModeAsync, GrabModeSync, None, invisible, CurrentT…
break;
usleep(1000);
}
if((running = running && (len > 0))) {
for(len = 1000; len; len--) {
- if(XGrabKeyboard(dpy, root, True, GrabModeAsync, GrabM…
+ if(XGrabKeyboard(dpy, w, True, GrabModeAsync, GrabMode…
== GrabSuccess)
break;
usleep(1000);
@@ -102,7 +103,6 @@ main(int argc, char **argv) {
running = (len > 0);
}
len = 0;
- XMapRaised(dpy, w);
XSync(dpy, False);
/* main event loop */
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.