mirror of
https://github.com/mintycube/slock.git
synced 2024-10-22 14:05:51 +02:00
applied somwhat similiar patch like Alex Elide proposed
This commit is contained in:
parent
6e53ce4582
commit
8a7a68c4c0
9
slock.c
9
slock.c
@ -77,9 +77,12 @@ main(int argc, char **argv) {
|
|||||||
XDefineCursor(dpy, w, invisible);
|
XDefineCursor(dpy, w, invisible);
|
||||||
running = XGrabPointer(dpy, RootWindow(dpy, screen), False,
|
running = XGrabPointer(dpy, RootWindow(dpy, screen), False,
|
||||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
|
ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
|
||||||
GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) == GrabSuccess
|
GrabModeAsync, GrabModeSync, None, invisible, CurrentTime) == GrabSuccess;
|
||||||
&& XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync,
|
len = 10;
|
||||||
GrabModeAsync, CurrentTime) == GrabSuccess;
|
for(len = 10; len && (XGrabKeyboard(dpy, RootWindow(dpy, screen), True, GrabModeAsync,
|
||||||
|
GrabModeAsync, CurrentTime) != GrabSuccess); len--)
|
||||||
|
usleep(1000);
|
||||||
|
running = running && (len > 0);
|
||||||
XMapRaised(dpy, w);
|
XMapRaised(dpy, w);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user