summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-12-02 16:08:26 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-12-02 16:08:26 -0500
commit2b41d26b63fac8fd10b8c58e739addb7dfc98080 (patch)
treeb44da7d04321f9f53b45744d00b6e1cec2935ee0
parentMerge pull request #291 from christophgysin/libs (diff)
parentFix using last output config if none matched (diff)
downloadsway-2b41d26b63fac8fd10b8c58e739addb7dfc98080.tar.gz
sway-2b41d26b63fac8fd10b8c58e739addb7dfc98080.tar.zst
sway-2b41d26b63fac8fd10b8c58e739addb7dfc98080.zip
Merge pull request #294 from christophgysin/match
Fix using last output config if none matched
-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) {
82 struct output_config *oc = NULL; 82 struct output_config *oc = NULL;
83 int i; 83 int i;
84 for (i = 0; i < config->output_configs->length; ++i) { 84 for (i = 0; i < config->output_configs->length; ++i) {
85 oc = config->output_configs->items[i]; 85 struct output_config *cur = config->output_configs->items[i];
86 if (strcasecmp(name, oc->name) == 0) { 86 if (strcasecmp(name, cur->name) == 0) {
87 sway_log(L_DEBUG, "Matched output config for %s", name); 87 sway_log(L_DEBUG, "Matched output config for %s", name);
88 oc = cur;
88 break; 89 break;
89 } 90 }
90 if (strcasecmp("*", oc->name) == 0) { 91 if (strcasecmp("*", cur->name) == 0) {
91 sway_log(L_DEBUG, "Matched wildcard output config for %s", name); 92 sway_log(L_DEBUG, "Matched wildcard output config for %s", name);
93 oc = cur;
92 break; 94 break;
93 } 95 }
94 } 96 }