allow toggling the layout before selecting a different one

This commit is contained in:
Guido Cella 2024-01-16 19:11:18 +01:00 committed by Leonardo Hernández Hernández
parent 5ae245beed
commit 8006e79200
No known key found for this signature in database
GPG Key ID: E538897EE11B9624

3
dwl.c
View File

@ -871,7 +871,8 @@ createmon(struct wl_listener *listener, void *data)
m->m.y = r->y; m->m.y = r->y;
m->mfact = r->mfact; m->mfact = r->mfact;
m->nmaster = r->nmaster; m->nmaster = r->nmaster;
m->lt[0] = m->lt[1] = r->lt; m->lt[0] = r->lt;
m->lt[1] = &layouts[LENGTH(layouts) > 1 && r->lt != &layouts[1]];
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol)); strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
wlr_output_state_set_scale(&state, r->scale); wlr_output_state_set_scale(&state, r->scale);
wlr_output_state_set_transform(&state, r->rr); wlr_output_state_set_transform(&state, r->rr);