aboutsummaryrefslogtreecommitdiff
path: root/sway/config
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/bar.c26
-rw-r--r--sway/config/input.c7
2 files changed, 13 insertions, 20 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c
index f83b37d1..48a632fb 100644
--- a/sway/config/bar.c
+++ b/sway/config/bar.c
@@ -165,7 +165,7 @@ cleanup:
return NULL;
}
-void invoke_swaybar(struct bar_config *bar) {
+static void invoke_swaybar(struct bar_config *bar) {
// Pipe to communicate errors
int filedes[2];
if (pipe(filedes) == -1) {
@@ -219,27 +219,13 @@ void invoke_swaybar(struct bar_config *bar) {
close(filedes[1]);
}
-void load_swaybars() {
+void load_swaybars(void) {
for (int i = 0; i < config->bars->length; ++i) {
struct bar_config *bar = config->bars->items[i];
- bool apply = false;
- if (bar->outputs) {
- for (int j = 0; j < bar->outputs->length; ++j) {
- char *o = bar->outputs->items[j];
- if (!strcmp(o, "*") || output_by_name(o)) {
- apply = true;
- break;
- }
- }
- } else {
- apply = true;
- }
- if (apply) {
- if (bar->pid != 0) {
- terminate_swaybar(bar->pid);
- }
- wlr_log(WLR_DEBUG, "Invoking swaybar for bar id '%s'", bar->id);
- invoke_swaybar(bar);
+ if (bar->pid != 0) {
+ terminate_swaybar(bar->pid);
}
+ wlr_log(WLR_DEBUG, "Invoking swaybar for bar id '%s'", bar->id);
+ invoke_swaybar(bar);
}
}
diff --git a/sway/config/input.c b/sway/config/input.c
index 9885e85c..ad5b96c8 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -140,6 +140,13 @@ void free_input_config(struct input_config *ic) {
return;
}
free(ic->identifier);
+ free(ic->xkb_layout);
+ free(ic->xkb_model);
+ free(ic->xkb_options);
+ free(ic->xkb_rules);
+ free(ic->xkb_variant);
+ free(ic->mapped_from_region);
+ free(ic->mapped_to_output);
free(ic);
}