From bdbfb45d6687c69a83f2387b278e2ca97ef61a36 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Thu, 7 Dec 2023 21:51:24 -0600 Subject: copy layout symbol when matching a MonitorRule --- dwl.c | 8 ++++---- 1 file 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 -- cgit v1.2.3