layout.c
changeset 861 55691060ffa3
parent 858 b797071ebbd4
child 867 067a7784150e
equal deleted inserted replaced
860:9d9fd4575591 861:55691060ffa3
    36 			c->ismax = False;
    36 			c->ismax = False;
    37 			nx = wax;
    37 			nx = wax;
    38 			ny = way;
    38 			ny = way;
    39 			if(i < nmaster) {
    39 			if(i < nmaster) {
    40 				ny += i * mh;
    40 				ny += i * mh;
    41 				nw = mw - 2 * BORDERPX;
    41 				nw = mw - 2 * c->border;
    42 				nh = mh - 2 * BORDERPX;
    42 				nh = mh - 2 * c->border;
    43 			}
    43 			}
    44 			else {  /* tile window */
    44 			else {  /* tile window */
    45 				nx += mw;
    45 				nx += mw;
    46 				nw = tw - 2 * BORDERPX;
    46 				nw = tw - 2 * c->border;
    47 				if(th > 2 * BORDERPX) {
    47 				if(th > 2 * c->border) {
    48 					ny += (i - nmaster) * th;
    48 					ny += (i - nmaster) * th;
    49 					nh = th - 2 * BORDERPX;
    49 					nh = th - 2 * c->border;
    50 				}
    50 				}
    51 				else /* fallback if th <= 2 * BORDERPX */
    51 				else /* fallback if th <= 2 * c->border */
    52 					nh = wah - 2 * BORDERPX;
    52 					nh = wah - 2 * c->border;
    53 			}
    53 			}
    54 			resize(c, nx, ny, nw, nh, False);
    54 			resize(c, nx, ny, nw, nh, False);
    55 			i++;
    55 			i++;
    56 		}
    56 		}
    57 		else {
    57 		else {
   123 		return;
   123 		return;
   124 	if(!arg)
   124 	if(!arg)
   125 		masterw = MASTERWIDTH;
   125 		masterw = MASTERWIDTH;
   126 	else {
   126 	else {
   127 		i = atoi(arg);
   127 		i = atoi(arg);
   128 		if(waw * (masterw + i) / 1000 >= waw - 2 * BORDERPX
   128 		if(waw * (masterw + i) / 1000 >= waw - 2 * BORDERPX 
   129 		|| waw * (masterw + i) / 1000 <= 2 * BORDERPX)
   129 		|| waw * (masterw + i) / 1000 <= 2 * BORDERPX)
   130 			return;
   130 			return;
   131 		masterw += i;
   131 		masterw += i;
   132 	}
   132 	}
   133 	lt->arrange();
   133 	lt->arrange();