summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2023-12-07 21:51:24 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-12-07 21:51:24 -0600
commitbdbfb45d6687c69a83f2387b278e2ca97ef61a36 (patch)
tree3a982c4ce72584039395dc2c38278650fa093fd6
parent50ea84c5f6beb814faa2a0fc50149e51192bf97b (diff)
copy layout symbol when matching a MonitorRule
-rw-r--r--dwl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dwl.c b/dwl.c
index d7db9b5..d149a22 100644
--- a/dwl.c
+++ b/dwl.c
@@ -875,13 +875,14 @@ createmon(struct wl_listener *listener, void *data)
m->tagset[0] = m->tagset[1] = 1;
for (r = monrules; r < END(monrules); r++) {
if (!r->name || strstr(wlr_output->name, r->name)) {
+ m->m.x = r->x;
+ m->m.y = r->y;
m->mfact = r->mfact;
m->nmaster = r->nmaster;
- wlr_output_state_set_scale(&state, r->scale);
m->lt[0] = m->lt[1] = r->lt;
+ strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
+ wlr_output_state_set_scale(&state, r->scale);
wlr_output_state_set_transform(&state, r->rr);
- m->m.x = r->x;
- m->m.y = r->y;
break;
}
}
@@ -927,7 +928,6 @@ createmon(struct wl_listener *listener, void *data)
wlr_output_layout_add_auto(output_layout, wlr_output);
else
wlr_output_layout_add(output_layout, wlr_output, m->m.x, m->m.y);
- strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
}
void