~kris/suckless

slock

ec9c01c2d485d09614cfa251ca6600a045113f46 — bakkeby 1 year, 1 month ago 7202375
quick cancel: allow cancelling by key press in addition to mouse movement ref. #11
1 files changed, 1 insertions(+), 1 deletions(-)

M slock.c
M slock.c => slock.c +1 -1
@@ 261,7 261,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
			XNextEvent(dpy, &ev);
		#endif // AUTO_TIMEOUT_PATCH
		#if QUICKCANCEL_PATCH
		running = !((time(NULL) - locktime < timetocancel) && (ev.type == MotionNotify));
		running = !((time(NULL) - locktime < timetocancel) && (ev.type == MotionNotify || ev.type == KeyPress));
		#endif // QUICKCANCEL_PATCH
		if (ev.type == KeyPress) {
			#if AUTO_TIMEOUT_PATCH