From f653ff8af30368140d675c6a16eb3f2f23113709 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Wed, 4 Jun 2025 13:32:11 +0100 Subject: better quitting logic --- src/sxwm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sxwm.c b/src/sxwm.c index d43a7eb..6979cd7 100644 --- a/src/sxwm.c +++ b/src/sxwm.c @@ -124,6 +124,7 @@ Monitor *mons = NULL; int monsn = 0; Bool global_floating = False; Bool in_ws_switch = False; +Bool running = False; long last_motion_time = 0; int scr_width; @@ -1146,7 +1147,8 @@ void quit(void) XFreeCursor(dpy, c_move); XFreeCursor(dpy, c_normal); XFreeCursor(dpy, c_resize); - errx(0, "quitting..."); + printf("quitting...\n"); + running = False; } void reload_config(void) @@ -1242,6 +1244,7 @@ void resize_stack_sub(void) void run(void) { + running = True; XEvent xev; for (;;) { XNextEvent(dpy, &xev); -- cgit v1.2.3