applied sanders no_sizehints for tiled mode patch (thx!) 04eb016e
arg@10ksloc.org · 2006-07-20 19:09 2 file(s) · +11 −11
client.c +10 −10
293 293
}
294 294
295 295
void
296 -
resize(Client *c, Bool inc, Corner sticky)
296 +
resize(Client *c, Bool sizehints, Corner sticky)
297 297
{
298 298
	int bottom = c->y + c->h;
299 299
	int right = c->x + c->w;
300 300
	XConfigureEvent e;
301 301
302 -
	if(inc) {
302 +
	if(sizehints) {
303 303
		if(c->incw)
304 304
			c->w -= (c->w - c->basew) % c->incw;
305 305
		if(c->inch)
306 306
			c->h -= (c->h - c->baseh) % c->inch;
307 +
		if(c->minw && c->w < c->minw)
308 +
			c->w = c->minw;
309 +
		if(c->minh && c->h < c->minh)
310 +
			c->h = c->minh;
311 +
		if(c->maxw && c->w > c->maxw)
312 +
			c->w = c->maxw;
313 +
		if(c->maxh && c->h > c->maxh)
314 +
			c->h = c->maxh;
307 315
	}
308 316
	if(c->x > sw) /* might happen on restart */
309 317
		c->x = sw - c->w;
310 318
	if(c->y > sh)
311 319
		c->y = sh - c->h;
312 -
	if(c->minw && c->w < c->minw)
313 -
		c->w = c->minw;
314 -
	if(c->minh && c->h < c->minh)
315 -
		c->h = c->minh;
316 -
	if(c->maxw && c->w > c->maxw)
317 -
		c->w = c->maxw;
318 -
	if(c->maxh && c->h > c->maxh)
319 -
		c->h = c->maxh;
320 320
	if(sticky == TopRight || sticky == BotRight)
321 321
		c->x = right - c->w;
322 322
	if(sticky == BotLeft || sticky == BotRight)
dwm.h +1 −1
106 106
extern void lower(Client *c);
107 107
extern void manage(Window w, XWindowAttributes *wa);
108 108
extern void pop(Client *c);
109 -
extern void resize(Client *c, Bool inc, Corner sticky);
109 +
extern void resize(Client *c, Bool sizehints, Corner sticky);
110 110
extern void setsize(Client *c);
111 111
extern void settitle(Client *c);
112 112
extern void togglemax(Arg *arg);