summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2015-12-18 17:43:03 +0100
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2015-12-18 18:27:44 +0100
commitede27eabc53dc926aa1932c2a58c06def1000f86 (patch)
tree4d734e99a6163d846423c79a2d7ff04070018e78 /include
parentswaybar: ipc_update_ws: Fix memory corruption. (diff)
downloadsway-ede27eabc53dc926aa1932c2a58c06def1000f86.tar.gz
sway-ede27eabc53dc926aa1932c2a58c06def1000f86.tar.zst
sway-ede27eabc53dc926aa1932c2a58c06def1000f86.zip
Reload swaybar/swaybg on config reload.
This works by tracking the pids of the child processes in the related output container and terminating the processes and spawning new ones on a config reload. Should solve: #347
Diffstat (limited to 'include')
-rw-r--r--include/config.h2
-rw-r--r--include/container.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 32562908..1f25a0cd 100644
--- a/include/config.h
+++ b/include/config.h
@@ -184,6 +184,8 @@ int sway_mouse_binding_cmp(const void *a, const void *b);
184int sway_mouse_binding_cmp_buttons(const void *a, const void *b); 184int sway_mouse_binding_cmp_buttons(const void *a, const void *b);
185void free_sway_mouse_binding(struct sway_mouse_binding *smb); 185void free_sway_mouse_binding(struct sway_mouse_binding *smb);
186 186
187void load_swaybars(swayc_t *output, int output_idx);
188
187/** 189/**
188 * Allocate and initialize default bar configuration. 190 * Allocate and initialize default bar configuration.
189 */ 191 */
diff --git a/include/container.h b/include/container.h
index 9a67a689..d76160de 100644
--- a/include/container.h
+++ b/include/container.h
@@ -1,5 +1,6 @@
1#ifndef _SWAY_CONTAINER_H 1#ifndef _SWAY_CONTAINER_H
2#define _SWAY_CONTAINER_H 2#define _SWAY_CONTAINER_H
3#include <sys/types.h>
3#include <wlc/wlc.h> 4#include <wlc/wlc.h>
4typedef struct sway_container swayc_t; 5typedef struct sway_container swayc_t;
5 6
@@ -81,6 +82,11 @@ struct sway_container {
81 char *class; 82 char *class;
82 char *app_id; 83 char *app_id;
83 84
85 // Used by output containers to keep track of swaybar/swaybg child
86 // processes.
87 list_t *bar_pids;
88 pid_t bg_pid;
89
84 int gaps; 90 int gaps;
85 91
86 list_t *children; 92 list_t *children;