equal
deleted
inserted
replaced
827 } |
827 } |
828 } |
828 } |
829 |
829 |
830 Client * |
830 Client * |
831 getclient(Window w) { |
831 getclient(Window w) { |
832 Client *c = NULL; |
832 Client *c; |
833 Monitor *m; |
833 Monitor *m; |
834 |
834 |
835 for(m = mons; m; m = m->next) |
835 for(m = mons; m; m = m->next) |
836 for(c = m->clients; c && c->win != w; c = c->next); |
836 for(c = m->clients; c; c = c->next) |
837 return c; |
837 if(c->win == w) |
|
838 return c; |
|
839 return NULL; |
838 } |
840 } |
839 |
841 |
840 unsigned long |
842 unsigned long |
841 getcolor(const char *colstr) { |
843 getcolor(const char *colstr) { |
842 Colormap cmap = DefaultColormap(dpy, screen); |
844 Colormap cmap = DefaultColormap(dpy, screen); |
1724 updatebarpos(m); |
1726 updatebarpos(m); |
1725 } |
1727 } |
1726 |
1728 |
1727 /* reassign left over clients of disappeared monitors */ |
1729 /* reassign left over clients of disappeared monitors */ |
1728 for(tm = mons; tm; tm = tm->next) { |
1730 for(tm = mons; tm; tm = tm->next) { |
1729 while((c = tm->clients)) { |
1731 while(tm->clients) { |
1730 detach(c); |
1732 c = tm->clients; |
|
1733 tm->clients = c->next; |
1731 detachstack(c); |
1734 detachstack(c); |
1732 c->mon = newmons; |
1735 c->mon = newmons; |
1733 attach(c); |
1736 attach(c); |
1734 attachstack(c); |
1737 attachstack(c); |
1735 } |
1738 } |