sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit ffdfaaa985467ea673c9c388bf1a18f7ca83af41
parent 7d82cd9c0a418385fbde72f4503459ab7afa1bde
Author: Christoph Gysin <christoph.gysin@gmail.com>
Date:   Sun, 29 Nov 2015 15:24:11 +0200

apply_output_config: use list_seq_find() to find config

Diffstat:
Msway/config.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sway/config.c b/sway/config.c @@ -299,12 +299,10 @@ void apply_output_config(struct output_config *oc, swayc_t *output) { if (!oc || !oc->background) { // Look for a * config for background - int i; - for (i = 0; i < config->output_configs->length; ++i) { + int i = list_seq_find(config->output_configs, output_name_cmp, "*"); + if (i >= 0) { oc = config->output_configs->items[i]; - if (strcasecmp("*", oc->name) == 0) { - break; - } + } else { oc = NULL; } }