2019-09-05 23:59:13 +02:00
|
|
|
void
|
|
|
|
tagallmon(const Arg *arg)
|
|
|
|
{
|
|
|
|
Monitor *m;
|
2020-09-05 11:38:09 +02:00
|
|
|
Client *c, *last, *slast, *next;
|
2019-09-05 23:59:13 +02:00
|
|
|
|
|
|
|
if (!mons->next)
|
|
|
|
return;
|
|
|
|
|
|
|
|
m = dirtomon(arg->i);
|
2020-09-05 11:38:09 +02:00
|
|
|
for (last = m->clients; last && last->next; last = last->next);
|
|
|
|
for (slast = m->stack; slast && slast->snext; slast = slast->snext);
|
|
|
|
|
2019-09-05 23:59:13 +02:00
|
|
|
for (c = selmon->clients; c; c = next) {
|
|
|
|
next = c->next;
|
|
|
|
if (!ISVISIBLE(c))
|
|
|
|
continue;
|
2020-09-05 11:38:09 +02:00
|
|
|
unfocus(c, 1, NULL);
|
2019-09-05 23:59:13 +02:00
|
|
|
detach(c);
|
|
|
|
detachstack(c);
|
|
|
|
c->mon = m;
|
|
|
|
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
2020-09-05 11:38:09 +02: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 23:59:13 +02:00
|
|
|
if (c->isfullscreen) {
|
2020-09-05 11:38:09 +02: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 23:59:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
arrange(NULL);
|
2023-06-27 16:07:13 +02:00
|
|
|
focus(NULL);
|
2021-06-14 07:16:17 +02:00
|
|
|
}
|
|
|
|
|