applied the patch I missed from Gottox, thanks mate! ea0008cb
arg@garbe.us · 2009-03-03 11:22 1 file(s) · +13 −11
dwm.c +13 −11
170 170
static Client *nexttiled(Client *c);
171 171
static void propertynotify(XEvent *e);
172 172
static void quit(const Arg *arg);
173 -
static void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
173 +
static void resize(Client *c, int x, int y, int w, int h);
174 174
static void resizemouse(const Arg *arg);
175 175
static void restack(void);
176 176
static void run(void);
274 274
void
275 275
applysizehints(Client *c, int *w, int *h) {
276 276
	Bool baseismin;
277 +
278 +
	if(!resizehints && !c->isfloating)
279 +
		return;
277 280
278 281
	/* see last two sentences in ICCCM 4.1.2.3 */
279 282
	baseismin = c->basew == c->minw && c->baseh == c->minh;
981 984
	Client *c;
982 985
983 986
	for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
984 -
		resize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw, resizehints);
987 +
		resize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw);
985 988
	}
986 989
}
987 990
1029 1032
					togglefloating(NULL);
1030 1033
			}
1031 1034
			if(!lt[sellt]->arrange || c->isfloating)
1032 -
				resize(c, nx, ny, c->w, c->h, False);
1035 +
				resize(c, nx, ny, c->w, c->h);
1033 1036
			break;
1034 1037
		}
1035 1038
	}
1085 1088
}
1086 1089
1087 1090
void
1088 -
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
1091 +
resize(Client *c, int x, int y, int w, int h) {
1089 1092
	XWindowChanges wc;
1090 1093
1091 -
	if(sizehints)
1092 -
		applysizehints(c, &w, &h);
1094 +
	applysizehints(c, &w, &h);
1093 1095
	if(w <= 0 || h <= 0)
1094 1096
		return;
1095 1097
	if(x > sx + sw)
1154 1156
					togglefloating(NULL);
1155 1157
			}
1156 1158
			if(!lt[sellt]->arrange || c->isfloating)
1157 -
				resize(c, c->x, c->y, nw, nh, True);
1159 +
				resize(c, c->x, c->y, nw, nh);
1158 1160
			break;
1159 1161
		}
1160 1162
	}
1344 1346
	if(ISVISIBLE(c)) { /* show clients top down */
1345 1347
		XMoveWindow(dpy, c->win, c->x, c->y);
1346 1348
		if(!lt[sellt]->arrange || c->isfloating)
1347 -
			resize(c, c->x, c->y, c->w, c->h, True);
1349 +
			resize(c, c->x, c->y, c->w, c->h);
1348 1350
		showhide(c->snext, ntiled);
1349 1351
	}
1350 1352
	else { /* hide clients bottom up */
1405 1407
	/* master */
1406 1408
	c = nexttiled(clients);
1407 1409
	mw = mfact * ww;
1408 -
	resize(c, wx, wy, (n == 1 ? ww : mw) - 2 * c->bw, wh - 2 * c->bw, resizehints);
1410 +
	resize(c, wx, wy, (n == 1 ? ww : mw) - 2 * c->bw, wh - 2 * c->bw);
1409 1411
1410 1412
	if(--n == 0)
1411 1413
		return;
1420 1422
1421 1423
	for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
1422 1424
		resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
1423 -
		       ? wy + wh - y - 2 * c->bw : h - 2 * c->bw), resizehints);
1425 +
		       ? wy + wh - y - 2 * c->bw : h - 2 * c->bw));
1424 1426
		if(h != wh)
1425 1427
			y = c->y + HEIGHT(c);
1426 1428
	}
1440 1442
		return;
1441 1443
	sel->isfloating = !sel->isfloating || sel->isfixed;
1442 1444
	if(sel->isfloating)
1443 -
		resize(sel, sel->x, sel->y, sel->w, sel->h, True);
1445 +
		resize(sel, sel->x, sel->y, sel->w, sel->h);
1444 1446
	arrange();
1445 1447
}
1446 1448