summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwl.c4
1 files changed, 3 insertions, 1 deletions
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);