applied checking existance of >2 tiles patch (proposed by sander) to zoom and resizecol ec85fddb
Anselm R. Garbe · 2006-09-05 16:00 1 file(s) · +14 −5
view.c +14 −5
183 183
void
184 184
resizecol(Arg *arg)
185 185
{
186 -
	Client *c = getnext(clients);
186 +
	unsigned int n;
187 +
	Client *c;
187 188
188 -
	if(!sel || !getnext(c->next) || (arrange != dotile))
189 +
	for(n = 0, c = clients; c; c = c->next)
190 +
		if(isvisible(c) && !c->isfloat)
191 +
			n++;
192 +
	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
189 193
		return;
194 +
190 195
	if(sel == getnext(clients)) {
191 196
		if(mw + arg->i > sw - 100)
192 197
			return;
303 308
void
304 309
zoom(Arg *arg)
305 310
{
306 -
	Client *c = sel;
311 +
	unsigned int n;
312 +
	Client *c;
307 313
308 -
	if(!c || (arrange != dotile) || c->isfloat || maximized)
314 +
	for(n = 0, c = clients; c; c = c->next)
315 +
		if(isvisible(c) && !c->isfloat)
316 +
			n++;
317 +
	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
309 318
		return;
310 319
311 -
	if(c == getnext(clients))
320 +
	if((c = sel)  == getnext(clients))
312 321
		if(!(c = getnext(c->next)))
313 322
			return;
314 323
	detach(c);