2019-09-05 21:59:13 +00:00
|
|
|
void
|
|
|
|
tagallmon(const Arg *arg)
|
|
|
|
{
|
|
|
|
Monitor *m;
|
2020-09-05 09:38:09 +00:00
|
|
|
Client *c, *last, *slast, *next;
|
2019-09-05 21:59:13 +00:00
|
|
|
|
|
|
|
if (!mons->next)
|
|
|
|
return;
|
|
|
|
|
|
|
|
m = dirtomon(arg->i);
|
2020-09-05 09:38:09 +00:00
|
|
|
for (last = m->clients; last && last->next; last = last->next);
|
|
|
|
for (slast = m->stack; slast && slast->snext; slast = slast->snext);
|
|
|
|
|
2019-09-05 21:59:13 +00:00
|
|
|
for (c = selmon->clients; c; c = next) {
|
|
|
|
next = c->next;
|
|
|
|
if (!ISVISIBLE(c))
|
|
|
|
continue;
|
2020-09-05 09:38:09 +00:00
|
|
|
unfocus(c, 1, NULL);
|
2019-09-05 21:59:13 +00:00
|
|
|
detach(c);
|
|
|
|
detachstack(c);
|
|
|
|
c->mon = m;
|
|
|
|
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
2020-09-05 09:38:09 +00:00
|
|
|
c->next = NULL;
|
|
|
|
c->snext = NULL;
|
|
|
|
if (last)
|
|
|
|
last = last->next = c;
|
|
|
|
else
|
|
|
|
m->clients = last = c;
|
|
|
|
if (slast)
|
|
|
|
slast = slast->snext = c;
|
|
|
|
else
|
|
|
|
m->stack = slast = c;
|
2019-09-05 21:59:13 +00:00
|
|
|
if (c->isfullscreen) {
|
2020-09-05 09:38:09 +00:00
|
|
|
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
|
|
|
if (c->fakefullscreen != 1) {
|
|
|
|
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
|
|
|
|
XRaiseWindow(dpy, c->win);
|
|
|
|
}
|
|
|
|
#elif !FAKEFULLSCREEN_PATCH
|
|
|
|
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
|
|
|
|
XRaiseWindow(dpy, c->win);
|
|
|
|
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
2019-09-05 21:59:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
focus(NULL);
|
|
|
|
arrange(NULL);
|
|
|
|
}
|