diff options
author | Stivvo <stivvo01@gmail.com> | 2020-10-30 23:49:01 +0100 |
---|---|---|
committer | Stivvo <stivvo01@gmail.com> | 2020-10-30 23:49:01 +0100 |
commit | 62fb4c086ea5080977edc4ec017390aa924607ed (patch) | |
tree | 44f19dba1a27ffcbf6714dd77b9d61aa6b225674 /dwl.c | |
parent | 388ab9df2f655e7bd228b98ccf48ab612c0ffe4e (diff) |
Block access to disabled monitor
Before this, pressing mod+comma or mod+period (focusmon function) moved
the focus to disabed monitors. Now, all disabled monitors are skipped
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1087,10 +1087,12 @@ focusclient(Client *old, Client *c, int lift) void focusmon(const Arg *arg) { - Client *sel = selclient(); - - selmon = dirtomon(arg->i); - focusclient(sel, focustop(selmon), 1); + Client *sel; + do { + sel = selclient(); + selmon = dirtomon(arg->i); + focusclient(sel, focustop(selmon), 1); + } while (!selmon->wlr_output->enabled); } void |