From 934ce085b6f4784517d4111ec5c127553a19337d Mon Sep 17 00:00:00 2001 From: Stivvo Date: Sat, 31 Oct 2020 16:18:23 +0100 Subject: [PATCH] Don't switch to disabled mons after unplug --- dwl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index eeecb75..78fac21 100644 --- a/dwl.c +++ b/dwl.c @@ -704,7 +704,9 @@ cleanupmon(struct wl_listener *listener, void *data) updatemons(); - selmon = wl_container_of(mons.next, selmon, link); + do // don't switch to disabled mons + selmon = wl_container_of(mons.next, selmon, link); + while (!selmon->wlr_output->enabled); focusclient(selclient(), focustop(selmon), 1); closemon(m);