From fbae5f8009f0446244246182864cbc1ffe9fcb1e Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Fri, 11 Dec 2020 05:41:30 +0100 Subject: [PATCH] Hide windows below in the monocle layout When the layout is monocle, stop rendering clients other than the focused one. This improves aesthetics and readability when using a terminal with a transparent background. --- dwl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 730e46a..e84d161 100644 --- a/dwl.c +++ b/dwl.c @@ -1175,7 +1175,8 @@ renderclients(Monitor *m, struct timespec *now) wl_list_for_each_reverse(c, &stack, slink) { /* Only render visible clients which show on this monitor */ if (!VISIBLEON(c, c->mon) || !wlr_output_layout_intersects( - output_layout, m->wlr_output, &c->geom)) + output_layout, m->wlr_output, &c->geom) || + (selmon->lt[selmon->sellt]->arrange == monocle && c != sel)) continue; surface = WLR_SURFACE(c);