summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2024-01-16 19:11:18 +0100
committerLeonardo Hernández Hernández <leohdz172@proton.me>2024-02-07 02:23:33 +0000
commit8006e7920085947673517c3e296a1e308f935f75 (patch)
tree22692a183137562ec620d800cf5cd0957ff56b5a
parent5ae245beedd587a2c9748168ef494abd5a92469c (diff)
allow toggling the layout before selecting a different one
-rw-r--r--dwl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index e999923..fa76db2 100644
--- a/dwl.c
+++ b/dwl.c
@@ -871,7 +871,8 @@ createmon(struct wl_listener *listener, void *data)
m->m.y = r->y;
m->mfact = r->mfact;
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));
wlr_output_state_set_scale(&state, r->scale);
wlr_output_state_set_transform(&state, r->rr);