aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-03-30 00:30:38 -0400
committerFurkan Sahin <furkan-dev@proton.me>2018-03-30 00:30:38 -0400
commit7f467807994393a440fc4d6f7698a82339857b1c (patch)
tree483724c2d407d57456552b8b59ef216a38f1c445 /swaybar
parent7cfa56e30bcf6274649171e7623e033ee5c024ee (diff)
Fix issues with swaybar on DRM
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/ipc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index a82904bd..326f25cc 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -188,7 +188,7 @@ static void ipc_parse_config(
json_object *output = json_object_array_get_idx(outputs, i);
const char *name = json_object_get_string(output);
if (strcmp("*", name) == 0) {
- // TODO: do we need to clear out the list here or something
+ config->all_outputs = true;
break;
}
struct config_output *coutput = calloc(
@@ -197,6 +197,8 @@ static void ipc_parse_config(
coutput->index = SIZE_MAX;
wl_list_insert(&config->outputs, &coutput->link);
}
+ } else {
+ config->all_outputs = true;
}
if (colors) {
@@ -279,7 +281,7 @@ static void ipc_get_outputs(struct swaybar *bar) {
if (!active) {
continue;
}
- if (wl_list_empty(&bar->config->outputs)) {
+ if (bar->config->all_outputs) {
struct config_output *coutput = calloc(
1, sizeof(struct config_output));
coutput->name = strdup(name);