aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Christoph Gysin <christoph.gysin@gmail.com>2015-11-29 15:24:11 +0200
committerLibravatar Christoph Gysin <christoph.gysin@gmail.com>2015-11-29 15:31:58 +0200
commitffdfaaa985467ea673c9c388bf1a18f7ca83af41 (patch)
treeec02e0289f0601f7e178a169ed853a6ab446f5ee /sway
parentcmd_output: Use list_seq_find() to find matching config (diff)
downloadsway-ffdfaaa985467ea673c9c388bf1a18f7ca83af41.tar.gz
sway-ffdfaaa985467ea673c9c388bf1a18f7ca83af41.tar.zst
sway-ffdfaaa985467ea673c9c388bf1a18f7ca83af41.zip
apply_output_config: use list_seq_find() to find config
Diffstat (limited to 'sway')
-rw-r--r--sway/config.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sway/config.c b/sway/config.c
index bb9142c0..dd466e5b 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -299,12 +299,10 @@ void apply_output_config(struct output_config *oc, swayc_t *output) {
299 299
300 if (!oc || !oc->background) { 300 if (!oc || !oc->background) {
301 // Look for a * config for background 301 // Look for a * config for background
302 int i; 302 int i = list_seq_find(config->output_configs, output_name_cmp, "*");
303 for (i = 0; i < config->output_configs->length; ++i) { 303 if (i >= 0) {
304 oc = config->output_configs->items[i]; 304 oc = config->output_configs->items[i];
305 if (strcasecmp("*", oc->name) == 0) { 305 } else {
306 break;
307 }
308 oc = NULL; 306 oc = NULL;
309 } 307 }
310 } 308 }