aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-05-09 16:30:08 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-05-11 13:34:48 -0400
commit56b7d8936ad4f62d43d6ac1989b90b8b1b5a8731 (patch)
treee103528500918007a720481873b661f9dcee5259
parentDestroy swaybg client on reload (diff)
downloadsway-56b7d8936ad4f62d43d6ac1989b90b8b1b5a8731.tar.gz
sway-56b7d8936ad4f62d43d6ac1989b90b8b1b5a8731.tar.zst
sway-56b7d8936ad4f62d43d6ac1989b90b8b1b5a8731.zip
config/output: fix typo in merge_id_on_name1.1-rc2
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
-rw-r--r--sway/config/output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index 0022485b..f8e78fd1 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -110,7 +110,7 @@ static void merge_id_on_name(struct output_config *oc) {
110 wl_list_for_each(output, &root->all_outputs, link) { 110 wl_list_for_each(output, &root->all_outputs, link) {
111 name = output->wlr_output->name; 111 name = output->wlr_output->name;
112 output_get_identifier(id, sizeof(id), output); 112 output_get_identifier(id, sizeof(id), output);
113 if (strcmp(name, oc->name) != 0 || strcmp(id, oc->name) != 0) { 113 if (strcmp(name, oc->name) == 0 || strcmp(id, oc->name) == 0) {
114 size_t length = snprintf(NULL, 0, "%s on %s", id, name) + 1; 114 size_t length = snprintf(NULL, 0, "%s on %s", id, name) + 1;
115 id_on_name = malloc(length); 115 id_on_name = malloc(length);
116 if (!id_on_name) { 116 if (!id_on_name) {