From 14c010a0d69eb8a528d63a311a94134a52cab8bb Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Tue, 6 Sep 2022 00:10:00 -0500 Subject: only enable/disable clients from the specified monitor in arrange() also fix a crash when m is null, this can only happen when selmon is NULL --- dwl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index 9a7b42e..5ed534e 100644 --- a/dwl.c +++ b/dwl.c @@ -496,9 +496,10 @@ arrange(Monitor *m) { Client *c; wl_list_for_each(c, &clients, link) - wlr_scene_node_set_enabled(c->scene, VISIBLEON(c, c->mon)); + if (c->mon == m) + wlr_scene_node_set_enabled(c->scene, VISIBLEON(c, m)); - if (m->lt[m->sellt]->arrange) + if (m && m->lt[m->sellt]->arrange) m->lt[m->sellt]->arrange(m); motionnotify(0); } -- cgit v1.2.3