dwm.c
changeset 1468 654a2e8064ae
parent 1466 aa47da304ae2
child 1474 d39b21ff64f4
equal deleted inserted replaced
1467:d6c51030d117 1468:654a2e8064ae
   348 			*h -= c->baseh;
   348 			*h -= c->baseh;
   349 		}
   349 		}
   350 		/* adjust for aspect limits */
   350 		/* adjust for aspect limits */
   351 		if(c->mina > 0 && c->maxa > 0) {
   351 		if(c->mina > 0 && c->maxa > 0) {
   352 			if(c->maxa < (float)*w / *h)
   352 			if(c->maxa < (float)*w / *h)
   353 				*w = *h * c->maxa + 0.5; /* -Os double upcast workaround */
   353 				*w = *h * c->maxa + 0.5;
   354 			else if(c->mina < (float)*h / *w)
   354 			else if(c->mina < (float)*h / *w)
   355 				*h = *w * c->mina + 0.5; /* -Os double upcast workaround */
   355 				*h = *w * c->mina + 0.5;
   356 		}
   356 		}
   357 		if(baseismin) { /* increment calculation requires this */
   357 		if(baseismin) { /* increment calculation requires this */
   358 			*w -= c->basew;
   358 			*w -= c->basew;
   359 			*h -= c->baseh;
   359 			*h -= c->baseh;
   360 		}
   360 		}