diff options
| author | bakkeby <[email protected]> | 2021-10-25 15:43:14 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2021-10-25 15:43:14 +0200 |
| commit | ec6a64a64fd957ce10b04834f30cf3270c849309 (patch) | |
| tree | aeee676694adee4569f65a57a62c18e7323f8f2a /dwm.c | |
| parent | 297412adf48474877f803d283052c94fbfc793e4 (diff) | |
| download | dwm-flexipatch-ec6a64a64fd957ce10b04834f30cf3270c849309.tar.gz dwm-flexipatch-ec6a64a64fd957ce10b04834f30cf3270c849309.zip | |
onlyquitonempty + cool_autostart: adding proposed compatibility improvements ref. #194
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -2750,15 +2750,10 @@ quit(const Arg *arg) XQueryTree(dpy, root, junk, junk, &junk, &n); - #if COOL_AUTOSTART_PATCH - if (n - autostart_len <= quit_empty_window_count) - #else if (n <= quit_empty_window_count) - #endif // COOL_AUTOSTART_PATCH { #if RESTARTSIG_PATCH - if (arg->i) - restart = 1; + restart = arg->i; #endif // RESTARTSIG_PATCH running = 0; } @@ -2766,17 +2761,16 @@ quit(const Arg *arg) printf("[dwm] not exiting (n=%d)\n", n); free(junk); - #else + #else // !ONLYQUITONEMPTY_PATCH #if RESTARTSIG_PATCH - if (arg->i) - restart = 1; + restart = arg->i; #endif // RESTARTSIG_PATCH running = 0; #endif // ONLYQUITONEMPTY_PATCH #if COOL_AUTOSTART_PATCH /* kill child processes */ - for (i = 0; i < autostart_len; i++) { + for (i = 0; i < autostart_len && !running; i++) { if (0 < autostart_pids[i]) { kill(autostart_pids[i], SIGTERM); waitpid(autostart_pids[i], NULL, 0); |
