tagallmon.c (1118B)
1 void 2 tagallmon(const Arg *arg) 3 { 4 Monitor *m; 5 Client *c, *last, *slast, *next; 6 7 if (!mons->next) 8 return; 9 10 m = dirtomon(arg->i); 11 for (last = m->clients; last && last->next; last = last->next); 12 for (slast = m->stack; slast && slast->snext; slast = slast->snext); 13 14 for (c = selmon->clients; c; c = next) { 15 next = c->next; 16 if (!ISVISIBLE(c)) 17 continue; 18 unfocus(c, 1, NULL); 19 detach(c); 20 detachstack(c); 21 c->mon = m; 22 c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ 23 c->next = NULL; 24 c->snext = NULL; 25 if (last) 26 last = last->next = c; 27 else 28 m->clients = last = c; 29 if (slast) 30 slast = slast->snext = c; 31 else 32 m->stack = slast = c; 33 if (c->isfullscreen) { 34 #if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH 35 if (c->fakefullscreen != 1) { 36 resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh); 37 XRaiseWindow(dpy, c->win); 38 } 39 #elif !FAKEFULLSCREEN_PATCH 40 resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh); 41 XRaiseWindow(dpy, c->win); 42 #endif // FAKEFULLSCREEN_CLIENT_PATCH 43 } 44 } 45 46 arrange(NULL); 47 focus(NULL); 48 } 49