aboutsummaryrefslogtreecommitdiff
path: root/sway/container.c
diff options
context:
space:
mode:
authorChristoph Gysin <christoph.gysin@gmail.com>2015-12-02 23:04:50 +0200
committerChristoph Gysin <christoph.gysin@gmail.com>2015-12-02 23:05:04 +0200
commitbf5244b49ccb47edd62aaa6bc2343cafc157650d (patch)
treeb44da7d04321f9f53b45744d00b6e1cec2935ee0 /sway/container.c
parent7a1c8c2939c8581bb47323513b91a94aebf62b36 (diff)
Fix using last output config if none matched
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/container.c b/sway/container.c
index 3315fd93..c260e01a 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -82,13 +82,15 @@ swayc_t *new_output(wlc_handle handle) {
struct output_config *oc = NULL;
int i;
for (i = 0; i < config->output_configs->length; ++i) {
- oc = config->output_configs->items[i];
- if (strcasecmp(name, oc->name) == 0) {
+ struct output_config *cur = config->output_configs->items[i];
+ if (strcasecmp(name, cur->name) == 0) {
sway_log(L_DEBUG, "Matched output config for %s", name);
+ oc = cur;
break;
}
- if (strcasecmp("*", oc->name) == 0) {
+ if (strcasecmp("*", cur->name) == 0) {
sway_log(L_DEBUG, "Matched wildcard output config for %s", name);
+ oc = cur;
break;
}
}