comparison view.c @ 726:0f91934037b0 3.3

applied Sander's drop_bh patch
author Anselm R. Garbe <arg@suckless.org>
date Wed, 31 Jan 2007 20:08:55 +0100
parents d3876aa79292
children 6692d7e7e156
comparison
equal deleted inserted replaced
725:d99be681d502 726:0f91934037b0
96 c->h = mh - 2 * BORDERPX; 96 c->h = mh - 2 * BORDERPX;
97 } 97 }
98 else { /* tile window */ 98 else { /* tile window */
99 c->x += mw; 99 c->x += mw;
100 c->w = tw - 2 * BORDERPX; 100 c->w = tw - 2 * BORDERPX;
101 if(th - 2 * BORDERPX > bh) { 101 if(th > 2 * BORDERPX) {
102 c->y += (i - nmaster) * th; 102 c->y += (i - nmaster) * th;
103 c->h = th - 2 * BORDERPX; 103 c->h = th - 2 * BORDERPX;
104 } 104 }
105 else /* fallback if th - 2 * BORDERPX < bh */ 105 else /* fallback if th <= 2 * BORDERPX */
106 c->h = wah - 2 * BORDERPX; 106 c->h = wah - 2 * BORDERPX;
107 } 107 }
108 resize(c, False); 108 resize(c, False);
109 i++; 109 i++;
110 } 110 }
148 } 148 }
149 149
150 void 150 void
151 incnmaster(Arg *arg) { 151 incnmaster(Arg *arg) {
152 if((arrange == dofloat) || (nmaster + arg->i < 1) 152 if((arrange == dofloat) || (nmaster + arg->i < 1)
153 || (wah / (nmaster + arg->i) - 2 * BORDERPX < bh)) 153 || (wah / (nmaster + arg->i) <= 2 * BORDERPX))
154 return; 154 return;
155 nmaster += arg->i; 155 nmaster += arg->i;
156 if(sel) 156 if(sel)
157 arrange(); 157 arrange();
158 else 158 else
172 void 172 void
173 resizemaster(Arg *arg) { 173 resizemaster(Arg *arg) {
174 if(arg->i == 0) 174 if(arg->i == 0)
175 master = MASTER; 175 master = MASTER;
176 else { 176 else {
177 if(waw * (master + arg->i) / 1000 > waw - bh - 2 * BORDERPX 177 if(waw * (master + arg->i) / 1000 >= waw - 2 * BORDERPX
178 || waw * (master + arg->i) / 1000 < bh + 2 * BORDERPX) 178 || waw * (master + arg->i) / 1000 <= 2 * BORDERPX)
179 return; 179 return;
180 master += arg->i; 180 master += arg->i;
181 } 181 }
182 arrange(); 182 arrange();
183 } 183 }