1
0
mirror of https://github.com/emersion/kanshi synced 2024-11-26 05:55:27 +01:00

Fix index in apply_profile loop

Closes: https://github.com/emersion/kanshi/issues/32
This commit is contained in:
Simon Ser 2019-06-06 08:35:47 +03:00
parent 72498b95dc
commit 32666e0f58
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

5
main.c

@ -130,9 +130,10 @@ static void apply_profile(struct kanshi_state *state,
state->serial);
zwlr_output_configuration_v1_add_listener(config, &config_listener, pending);
size_t i = 0;
ssize_t i = -1;
struct kanshi_profile_output *profile_output;
wl_list_for_each(profile_output, &profile->outputs, link) {
i++;
struct kanshi_head *head = matches[i];
fprintf(stderr, "applying profile output '%s' on connected head '%s'\n",
@ -178,8 +179,6 @@ static void apply_profile(struct kanshi_state *state,
zwlr_output_configuration_head_v1_set_transform(config_head,
profile_output->transform);
}
i++;
}
zwlr_output_configuration_v1_apply(config);