+ Client *c;
+ int n, i, w, h;
+
+ w = sw - mw;
+ arrange = tiling;
+ for(n = 0, c = clients; c; c = c->next)
+ if(c->tags[tsel] && !c->floating)
+ n++;
+
+ h = (n > 1) ? sh / (n - 1) : sh;
+
+ for(i = 0, c = clients; c; c = c->next) {
+ if(c->tags[tsel]) {
+ if(c->floating) {
+ craise(c);
+ resize(c, True);
+ continue;
+ }
+ if(n == 1) {
+ c->x = sx;
+ c->y = sy;
+ c->w = sw - 2 * c->border;
+ c->h = sh - 2 * c->border;
+ }
+ else if(i == 0) {
+ c->x = sx;
+ c->y = sy;
+ c->w = mw - 2 * c->border;
+ c->h = sh - 2 * c->border;
+ }
+ else {
+ c->x = sx + mw;
+ c->y = sy + (i - 1) * h;
+ c->w = w - 2 * c->border;
+ c->h = h - 2 * c->border;
+ }
+ resize(c, False);
+ i++;
+ }
+ else
+ ban_client(c);
+ }
+ if(sel && !sel->tags[tsel]) {
+ if((sel = next(clients))) {
+ craise(sel);
+ focus(sel);
+ }
+ }
+ discard_events(EnterWindowMask);