From 47b19b295f085aff615301a7a78e6918e174a9b6 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Tue, 28 Jul 2020 09:54:08 +0200 Subject: [PATCH] Allow toggling the layout before selecting a different one --- dwl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index f7f88f1..f03a367 100644 --- a/dwl.c +++ b/dwl.c @@ -501,7 +501,8 @@ createmon(struct wl_listener *listener, void *data) m->nmaster = r->nmaster; wlr_output_set_scale(wlr_output, r->scale); wlr_xcursor_manager_load(cursor_mgr, r->scale); - m->lt[0] = m->lt[1] = r->lt; + m->lt[0] = r->lt; + m->lt[1] = &layouts[LENGTH(layouts) > 1 && r->lt != &layouts[1]]; wlr_output_set_transform(wlr_output, r->rr); break; }