diff --git a/src/mango.c b/src/mango.c index 21e71e5..3700441 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1196,7 +1196,9 @@ void applyrules(Client *c) { } int fullscreen_state_backup = c->isfullscreen || client_wants_fullscreen(c); - setmon(c, mon, newtags, !c->isopensilent); + setmon(c, mon, newtags, + !c->isopensilent && (!c->istagsilent || !newtags || + newtags & mon->tagset[mon->seltags])); if (!c->isopensilent && (!c->istagsilent || c->tags & c->mon->tagset[c->mon->seltags]) && @@ -4333,7 +4335,7 @@ void setmon(Client *c, Monitor *m, unsigned int newtags, bool focus) { setfloating(c, c->isfloating); setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */ } - if (m && focus && (!c->istagsilent || c->tags & m->tagset[m->seltags])) + if (m && focus) focusclient(focustop(m), 1); if (!c->foreign_toplevel && m) {