Hi Anselm,
Changeset 1343:f4707b7bd3a2 introduced erroneous parentheses in
(float)(w / h) and (float)(h / w). Now there is an integer devision,
and the result is converted to float, instead of converting the
denominator to force a float division.
This leads to funky behavior when resizing an mplayer window. A fix
is attached.
Regards,
Peter
diff -r 56c2529afeab dwm.c
--- a/dwm.c Fri Aug 29 11:29:19 2008 +0100
+++ b/dwm.c Tue Sep 02 19:53:59 2008 +0200
@@ -1056,9 +1056,9 @@
/* adjust for aspect limits */
if(c->mina > 0 && c->maxa > 0) {
- if(c->maxa < (float)(w / h))
+ if(c->maxa < (float)w / h)
w = h * c->maxa;
- else if(c->mina < (float)(h / w))
+ else if(c->mina < (float)h / w)
h = w * c->mina;
}