aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-05-09 16:30:08 -0400
committerSimon Ser <contact@emersion.fr>2019-05-09 23:52:01 +0300
commit8c8e6a6c9089d70c3b970b03c3f783eafd16f825 (patch)
tree0d784e4201b1d67c55a3bc65866dfd79fde1ac54 /sway
parent9dca18b6f7a4e0ff2234e61a18213af3f0196fff (diff)
config/output: fix typo in merge_id_on_name
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
Diffstat (limited to 'sway')
-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) {
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) {