aboutsummaryrefslogtreecommitdiff
path: root/swaybar/status_line.c
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-09-02 21:41:11 -0400
committerDrew DeVault <sir@cmpwn.com>2019-09-04 16:48:50 -1000
commit1fd2c6ba498e61f4fe823bf552f9d2fce8612de4 (patch)
tree8e2d9adab3451f1f05c76340d466a442c840e558 /swaybar/status_line.c
parent187306640ba8f2ab2f246a5030617ee985cf9223 (diff)
swaybar: complete barconfig_update event handling
This adds complete support for the barconfig_update ipc event. This also changes the bar command and subcommand handlers to correctly emit the event. This makes it so all bar subcommands other than id and swaybar_command are dynamically changeable at runtime. sway-bar.5 has been updated accordingly
Diffstat (limited to 'swaybar/status_line.c')
-rw-r--r--swaybar/status_line.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index 342f981e..2a9e1da8 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -5,6 +5,8 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include <unistd.h>
#include "log.h"
#include "loop.h"
@@ -174,6 +176,7 @@ struct status_line *status_line_init(char *cmd) {
void status_line_free(struct status_line *status) {
status_line_close_fds(status);
kill(status->pid, SIGTERM);
+ waitpid(status->pid, NULL, 0);
if (status->protocol == PROTOCOL_I3BAR) {
struct i3bar_block *block, *tmp;
wl_list_for_each_safe(block, tmp, &status->blocks, link) {