tagallmon.c - dwm - [fork] dynamic window manager
(HTM) git clone https://git.drkhsh.at/dwm.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
tagallmon.c (882B)
---
1 static void tagallmon(const Arg *arg);
2
3 void
4 tagallmon(const Arg *arg)
5 {
6 Monitor *m;
7 Client *c, *last, *slast, *next;
8
9 if (!mons->next)
10 return;
11
12 m = dirtomon(arg->i);
13 for (last = m->clients; last && last->next; last = last->next);
14 for (slast = m->stack; slast && slast->snext; slast = slast->snext);
15
16 for (c = selmon->clients; c; c = next) {
17 next = c->next;
18 if (!ISVISIBLE(c))
19 continue;
20 unfocus(c, 1);
21 detach(c);
22 detachstack(c);
23 c->mon = m;
24 c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
25 c->next = NULL;
26 c->snext = NULL;
27 if (last)
28 last = last->next = c;
29 else
30 m->clients = last = c;
31 if (slast)
32 slast = slast->snext = c;
33 else
34 m->stack = slast = c;
35 if (c->isfullscreen) {
36 resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
37 XRaiseWindow(dpy, c->win);
38 }
39 }
40
41 focus(NULL);
42 arrange(NULL);
43 }
44