diff --git a/dwm.c b/dwm.c index cf90f8b..d90b811 100644 --- a/dwm.c +++ b/dwm.c @@ -1214,12 +1214,13 @@ clientmessage(XEvent *e) } } else if (cme->message_type == netatom[NetActiveWindow]) { #if FOCUSONNETACTIVE_PATCH - if (c->tags & c->mon->tagset[c->mon->seltags]) { - selmon = c->mon; + if (c->tags & c->mon->tagset[c->mon->seltags]) focus(c); - } else { + else { for (i = 0; i < NUMTAGS && !((1 << i) & c->tags); i++); if (i < NUMTAGS) { + if (c != selmon->sel) + unfocus(selmon->sel, 0, NULL); selmon = c->mon; if (((1 << i) & TAGMASK) != selmon->tagset[selmon->seltags]) view(&((Arg) { .ui = 1 << i })); diff --git a/patch/bar_flexwintitle.c b/patch/bar_flexwintitle.c index 384878d..f7da241 100644 --- a/patch/bar_flexwintitle.c +++ b/patch/bar_flexwintitle.c @@ -172,7 +172,7 @@ flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int tabscheme, Ar return; int i, nclienttags = 0, nviewtags = 0, pad = lrpad / 2; int clientscheme = ( - c == m->sel + c == selmon->sel ? getselschemefor(tabscheme) : HIDDEN(c) ? SchemeHid