aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStivvo <stivvo01@gmail.com>2020-10-31 16:18:23 +0100
committerStivvo <stivvo01@gmail.com>2020-10-31 16:25:29 +0100
commit934ce085b6f4784517d4111ec5c127553a19337d (patch)
tree1bc31cebac491777c44b69422a765e0b0e3ea24b
parent38606a1d232aca987859808d8c6f68878b394805 (diff)
Don't switch to disabled mons after unplug
-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);