summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-08-02 12:33:24 +0200
committerbakkeby <[email protected]>2020-08-02 12:33:24 +0200
commitf067db87aa875f9290ff9328272d053942fe613b (patch)
tree46c64bb288e0ec5f5ee57397125f25066441e7c7 /patch
parentf87bd6c86e59d05f1f5920dab2c961831aeaa072 (diff)
downloaddwm-flexipatch-f067db87aa875f9290ff9328272d053942fe613b.tar.gz
dwm-flexipatch-f067db87aa875f9290ff9328272d053942fe613b.zip
awesomebar: when hiding a client make the next focused client the next tiled client
Diffstat (limited to 'patch')
-rw-r--r--patch/bar_awesomebar.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/patch/bar_awesomebar.c b/patch/bar_awesomebar.c
index 446b547..5a3a588 100644
--- a/patch/bar_awesomebar.c
+++ b/patch/bar_awesomebar.c
@@ -89,6 +89,7 @@ click_awesomebar(Bar *bar, Arg *arg, BarClickArg *a)
void
hide(Client *c) {
+ Client *n;
if (!c || HIDDEN(c))
return;
@@ -108,7 +109,16 @@ hide(Client *c) {
XSelectInput(dpy, w, ca.your_event_mask);
XUngrabServer(dpy);
- focus(c->snext);
+ if (c->isfloating || !c->mon->lt[c->mon->sellt]->arrange) {
+ for (n = c->snext; n && (!ISVISIBLE(n) || HIDDEN(n)); n = n->snext);
+ if (!n)
+ for (n = c->mon->stack; n && (!ISVISIBLE(n) || HIDDEN(n)); n = n->snext);
+ } else {
+ n = nexttiled(c);
+ if (!n)
+ n = nexttiled(c->mon->clients);
+ }
+ focus(n);
arrange(c->mon);
}