aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/status_line.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-09-02 21:41:11 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-09-04 16:48:50 -1000
commit1fd2c6ba498e61f4fe823bf552f9d2fce8612de4 (patch)
tree8e2d9adab3451f1f05c76340d466a442c840e558 /swaybar/status_line.c
parentseatop_default: only focus container on press (diff)
downloadsway-1fd2c6ba498e61f4fe823bf552f9d2fce8612de4.tar.gz
sway-1fd2c6ba498e61f4fe823bf552f9d2fce8612de4.tar.zst
sway-1fd2c6ba498e61f4fe823bf552f9d2fce8612de4.zip
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 @@
5#include <stdlib.h> 5#include <stdlib.h>
6#include <string.h> 6#include <string.h>
7#include <stdio.h> 7#include <stdio.h>
8#include <sys/types.h>
9#include <sys/wait.h>
8#include <unistd.h> 10#include <unistd.h>
9#include "log.h" 11#include "log.h"
10#include "loop.h" 12#include "loop.h"
@@ -174,6 +176,7 @@ struct status_line *status_line_init(char *cmd) {
174void status_line_free(struct status_line *status) { 176void status_line_free(struct status_line *status) {
175 status_line_close_fds(status); 177 status_line_close_fds(status);
176 kill(status->pid, SIGTERM); 178 kill(status->pid, SIGTERM);
179 waitpid(status->pid, NULL, 0);
177 if (status->protocol == PROTOCOL_I3BAR) { 180 if (status->protocol == PROTOCOL_I3BAR) {
178 struct i3bar_block *block, *tmp; 181 struct i3bar_block *block, *tmp;
179 wl_list_for_each_safe(block, tmp, &status->blocks, link) { 182 wl_list_for_each_safe(block, tmp, &status->blocks, link) {