aboutsummaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index a7018f4..d083c66 100644
--- a/dwm.c
+++ b/dwm.c
@@ -440,6 +440,8 @@ keyrelease(XEvent *e) {
void
combotag(const Arg *arg) {
+ Client *target = selmon->sel;
+
if(selmon->sel && arg->ui & TAGMASK) {
if (combo) {
selmon->sel->tags |= arg->ui & TAGMASK;
@@ -449,6 +451,16 @@ combotag(const Arg *arg) {
}
focus(NULL);
arrange(selmon);
+
+ if (followclient) {
+ Client *c;
+ int i = 0;
+
+ for (c = target->mon->clients; c && !ISVISIBLE(c); c = c->next)
+ if (c->tags == target->tags) i += 1;
+
+ if (i <= 1) view(arg);
+ }
}
}