mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 16:01:27 +00:00
Fix issues with swaybar on DRM
This commit is contained in:
parent
00d450e554
commit
2a90d26ebe
|
@ -30,6 +30,7 @@ struct swaybar_config {
|
||||||
bool wrap_scroll;
|
bool wrap_scroll;
|
||||||
bool workspace_buttons;
|
bool workspace_buttons;
|
||||||
struct wl_list outputs;
|
struct wl_list outputs;
|
||||||
|
bool all_outputs;
|
||||||
int height;
|
int height;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -188,7 +188,7 @@ static void ipc_parse_config(
|
||||||
json_object *output = json_object_array_get_idx(outputs, i);
|
json_object *output = json_object_array_get_idx(outputs, i);
|
||||||
const char *name = json_object_get_string(output);
|
const char *name = json_object_get_string(output);
|
||||||
if (strcmp("*", name) == 0) {
|
if (strcmp("*", name) == 0) {
|
||||||
// TODO: do we need to clear out the list here or something
|
config->all_outputs = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
struct config_output *coutput = calloc(
|
struct config_output *coutput = calloc(
|
||||||
|
@ -197,6 +197,8 @@ static void ipc_parse_config(
|
||||||
coutput->index = SIZE_MAX;
|
coutput->index = SIZE_MAX;
|
||||||
wl_list_insert(&config->outputs, &coutput->link);
|
wl_list_insert(&config->outputs, &coutput->link);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
config->all_outputs = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colors) {
|
if (colors) {
|
||||||
|
@ -279,7 +281,7 @@ static void ipc_get_outputs(struct swaybar *bar) {
|
||||||
if (!active) {
|
if (!active) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (wl_list_empty(&bar->config->outputs)) {
|
if (bar->config->all_outputs) {
|
||||||
struct config_output *coutput = calloc(
|
struct config_output *coutput = calloc(
|
||||||
1, sizeof(struct config_output));
|
1, sizeof(struct config_output));
|
||||||
coutput->name = strdup(name);
|
coutput->name = strdup(name);
|
||||||
|
|
Loading…
Reference in a new issue