lock

Fork of xl, the simplest screen locker
git clone git://git.laack.co/lock.git
Log | Files | Refs | README | LICENSE

commit b64d2ac127e0f996d27e90c3729f51d517971e2a
parent 310ec860001ad6825d96aae99984dca9121bdc6f
Author: Andrew Laack <andrew@laack.co>
Date:   Tue, 15 Sep 2026 09:11:12 -0500

Add back removed line

Diffstat:
Mmain.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -63,12 +63,15 @@ main(int argc, char *argv[]) } root = DefaultRootWindow(display); + for (i = 0; i < 1000; i++) { if (XGrabPointer(display, root, 1, ButtonPress, GrabModeAsync, GrabModeAsync, None, None, CurrentTime) == GrabSuccess) break; usleep(1000); } + + if (i == 1000) { fprintf(stderr, "could not grab pointer\n"); exit(1); @@ -85,6 +88,7 @@ main(int argc, char *argv[]) fprintf(stderr, "could not grab keyboard\n"); exit(1); } + XSelectInput(display, root, KeyPressMask); while (XNextEvent(display, &ev), 1) { if (ev.type == KeyPress) {