aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-31 00:35:06 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-31 00:35:06 -0400
commit18173fb5ade5af0d09a3e270701207f55bb5f97e (patch)
treed4757df0da8c678464171a294f1ed02288b0733d /sway/config
parentMerge pull request #1676 from swaywm/swaybar-input (diff)
downloadsway-18173fb5ade5af0d09a3e270701207f55bb5f97e.tar.gz
sway-18173fb5ade5af0d09a3e270701207f55bb5f97e.tar.zst
sway-18173fb5ade5af0d09a3e270701207f55bb5f97e.zip
Free bar configs on reload and exit
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/bar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c
index 48b2fc7c..2913f059 100644
--- a/sway/config/bar.c
+++ b/sway/config/bar.c
@@ -16,6 +16,7 @@
16#include "log.h" 16#include "log.h"
17 17
18static void terminate_swaybar(pid_t pid) { 18static void terminate_swaybar(pid_t pid) {
19 wlr_log(L_DEBUG, "Terminating swaybar %d", pid);
19 int ret = kill(pid, SIGTERM); 20 int ret = kill(pid, SIGTERM);
20 if (ret != 0) { 21 if (ret != 0) {
21 wlr_log_errno(L_ERROR, "Unable to terminate swaybar %d", pid); 22 wlr_log_errno(L_ERROR, "Unable to terminate swaybar %d", pid);
@@ -185,6 +186,7 @@ void invoke_swaybar(struct bar_config *bar) {
185 execvp(cmd[0], cmd); 186 execvp(cmd[0], cmd);
186 exit(1); 187 exit(1);
187 } 188 }
189 wlr_log(L_DEBUG, "Spawned swaybar %d", bar->pid);
188 close(filedes[0]); 190 close(filedes[0]);
189 ssize_t len; 191 ssize_t len;
190 if (read(filedes[1], &len, sizeof(int)) == sizeof(int)) { 192 if (read(filedes[1], &len, sizeof(int)) == sizeof(int)) {