aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar Charmander <~@charmander.me>2020-07-11 10:21:02 -0700
committerLibravatar Simon Ser <contact@emersion.fr>2020-07-22 09:40:37 +0200
commit66b7ac6a82ccf62e6408443f66c6a370a314ebaa (patch)
treeb1e21df5783287a899bbf57d0566be14059d0a9e /swaybar
parentFix typos in man page. (diff)
downloadsway-66b7ac6a82ccf62e6408443f66c6a370a314ebaa.tar.gz
sway-66b7ac6a82ccf62e6408443f66c6a370a314ebaa.tar.zst
sway-66b7ac6a82ccf62e6408443f66c6a370a314ebaa.zip
swaybar: allow status line cleanup to proceed when hidden
`determine_bar_visibility` stops and starts the status command process according to the bar’s visibility. If the bar was hidden during teardown, teardown would stall while waiting for the stopped status command process to exit. This resumes a stopped status command during teardown and allows, for example, sway to reload or quit without leaving a swaybar instance behind each time. Fixes #5536. CONT before TERM as requested in review.
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/status_line.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index 71ceb1d0..ecd91032 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -185,6 +185,7 @@ struct status_line *status_line_init(char *cmd) {
185 185
186void status_line_free(struct status_line *status) { 186void status_line_free(struct status_line *status) {
187 status_line_close_fds(status); 187 status_line_close_fds(status);
188 kill(status->pid, status->cont_signal);
188 kill(status->pid, SIGTERM); 189 kill(status->pid, SIGTERM);
189 waitpid(status->pid, NULL, 0); 190 waitpid(status->pid, NULL, 0);
190 if (status->protocol == PROTOCOL_I3BAR) { 191 if (status->protocol == PROTOCOL_I3BAR) {