tile.c
changeset 947 970931b7dd30
parent 946 b938876de936
child 948 4d9c86f8ed65
equal deleted inserted replaced
946:b938876de936 947:970931b7dd30
    37 	if(n > 1 && th < bh)
    37 	if(n > 1 && th < bh)
    38 		th = wah;
    38 		th = wah;
    39 
    39 
    40 	nx = wax;
    40 	nx = wax;
    41 	ny = way;
    41 	ny = way;
    42 	for(i = 0, c = clients; c; c = c->next)
    42 	for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) {
    43 		if(isvisible(c)) {
    43 		c->ismax = False;
    44 			if(c->isfloating)
    44 		if(i == 0) { /* master */
    45 				continue;
    45 			nw = mw - 2 * c->border;
    46 			c->ismax = False;
    46 			nh = wah - 2 * c->border;
    47 			if(i == 0) { /* master */
    47 		}
    48 				nw = mw - 2 * c->border;
    48 		else {  /* tile window */
    49 				nh = wah - 2 * c->border;
    49 			if(i == 1) {
       
    50 				ny = way;
       
    51 				nx += mw;
    50 			}
    52 			}
    51 			else {  /* tile window */
    53 			nw = waw - mw - 2 * c->border;
    52 				if(i == 1) {
    54 			if(i + 1 == n) /* remainder */
    53 					ny = way;
    55 				nh = (way + wah) - ny - 2 * c->border;
    54 					nx += mw;
    56 			else
    55 				}
    57 				nh = th - 2 * c->border;
    56 				nw = waw - mw - 2 * c->border;
       
    57 				if(i + 1 == n) /* remainder */
       
    58 					nh = (way + wah) - ny - 2 * c->border;
       
    59 				else
       
    60 					nh = th - 2 * c->border;
       
    61 			}
       
    62 			resize(c, nx, ny, nw, nh, False);
       
    63 			if(n > 1 && th != wah)
       
    64 				ny += nh + 2 * c->border;
       
    65 			i++;
       
    66 		}
    58 		}
       
    59 		resize(c, nx, ny, nw, nh, False);
       
    60 		if(n > 1 && th != wah)
       
    61 			ny += nh + 2 * c->border;
       
    62 		i++;
       
    63 	}
    67 }
    64 }
    68 
    65 
    69 void
    66 void
    70 zoom(const char *arg) {
    67 zoom(const char *arg) {
    71 	Client *c;
    68 	Client *c;