Skip to content

Commit

Permalink
config/output: fix typo in merge_id_on_name
Browse files Browse the repository at this point in the history
This fixes a typo in `merge_id_on_name` for output configs that
resulted in incorrect id-on-name output configs being generated.
Instead of using the output that matched the name or identifier, the
first output in the list was being used instead. This could cause
merging across unrelated output configs and preventing output configs
from being applied correctly
  • Loading branch information
RedSoxFan authored and ddevault committed May 11, 2019
1 parent 184663c commit 56b7d89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sway/config/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void merge_id_on_name(struct output_config *oc) {
wl_list_for_each(output, &root->all_outputs, link) {
name = output->wlr_output->name;
output_get_identifier(id, sizeof(id), output);
if (strcmp(name, oc->name) != 0 || strcmp(id, oc->name) != 0) {
if (strcmp(name, oc->name) == 0 || strcmp(id, oc->name) == 0) {
size_t length = snprintf(NULL, 0, "%s on %s", id, name) + 1;
id_on_name = malloc(length);
if (!id_on_name) {
Expand Down

0 comments on commit 56b7d89

Please sign in to comment.