Re: [dwm] 2 bugs in resize()

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Sat, 23 Aug 2008 18:04:25 +0100

Hi Peter,

2008/8/23 Peter Hartlich <sgkkr_AT_hartlich.com>:
>> The only reason I can imagine is, that y < x usually

> But with mina/maxa being floating point values, why is that a problem?

If y < x, then y / x < 1, whereas x / y > 1, afaik this might have
effect if we use c->mina as divisor later on.

> If you apply only half the patch, then in
>
> | else if(a < c->mina)
> | h = w / c->mina;
>
> c->mina would have to be changed to 1.0/c->mina.

Hmm, any reason why not restoring the previous h = w * c->mina instead?

>> Hmm, I might have overlooked this, however I'm rather confident that
>> most other WMs do it similiarly. I will add a check if minw == basew
>> && minh == baseh to prevent the subtraction in this corner case.
>
> A window could set min and base to be the same though... This size hint
> stuff is so hairy.

Indeed.

Kind regards,
--Anselm
Received on Sat Aug 23 2008 - 17:04:25 UTC

This archive was generated by hypermail 2.2.0 : Sat Aug 23 2008 - 17:12:03 UTC