aspects hints seem broken for fullscreen apps 6cf73e70
Anselm R Garbe · 2008-04-01 15:46 1 file(s) · +5 −3
dwm.c +5 −3
1196 1196
1197 1197
	if(sizehints) {
1198 1198
		/* set minimum possible */
1199 -
		if (w < 1)
1199 +
		if(w < 1)
1200 1200
			w = 1;
1201 -
		if (h < 1)
1201 +
		if(h < 1)
1202 1202
			h = 1;
1203 1203
1204 1204
		/* temporarily remove base dimensions */
1206 1206
		h -= c->baseh;
1207 1207
1208 1208
		/* adjust for aspect limits */
1209 -
		if (c->minay > 0 && c->maxay > 0 && c->minax > 0 && c->maxax > 0) {
1209 +
		if(c->minax != c->maxax && c->minay != c->maxay 
1210 +
		&& c->minax > 0 && c->maxax > 0 && c->minay > 0 && c->maxay > 0)
1211 +
		{
1210 1212
			if (w * c->maxay > h * c->maxax)
1211 1213
				w = h * c->maxax / c->maxay;
1212 1214
			else if (w * c->minay < h * c->minax)