mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
awesomebar: use previously tiled when hiding client and the hidden client was the last tiled client
This commit is contained in:
parent
12527f00d9
commit
3f4f88c142
@ -116,7 +116,7 @@ hide(Client *c) {
|
|||||||
} else {
|
} else {
|
||||||
n = nexttiled(c);
|
n = nexttiled(c);
|
||||||
if (!n)
|
if (!n)
|
||||||
n = nexttiled(c->mon->clients);
|
n = prevtiled(c);
|
||||||
}
|
}
|
||||||
focus(n);
|
focus(n);
|
||||||
arrange(c->mon);
|
arrange(c->mon);
|
||||||
@ -149,6 +149,16 @@ togglewin(const Arg *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Client *
|
||||||
|
prevtiled(Client *c)
|
||||||
|
{
|
||||||
|
Client *p, *i;
|
||||||
|
for (p = NULL, i = c->mon->clients; c && i != c; i = i->next)
|
||||||
|
if (ISVISIBLE(i) && !HIDDEN(i))
|
||||||
|
p = i;
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
showhideclient(const Arg *arg)
|
showhideclient(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
@ -5,4 +5,5 @@ static int click_awesomebar(Bar *bar, Arg *arg, BarClickArg *a);
|
|||||||
static void hide(Client *c);
|
static void hide(Client *c);
|
||||||
static void show(Client *c);
|
static void show(Client *c);
|
||||||
static void togglewin(const Arg *arg);
|
static void togglewin(const Arg *arg);
|
||||||
|
static Client *prevtiled(Client *c);
|
||||||
static void showhideclient(const Arg *arg);
|
static void showhideclient(const Arg *arg);
|
Loading…
Reference in New Issue
Block a user