On Thu, May 24, 2007 at 04:10:20PM +0200, Jukka Salmi wrote:
> Anselm R. Garbe --> dwm (2007-05-24 15:44:33 +0200):
> > Ok I pushed a version, which handles the problem properly for
> > both master and stack areas. It's time for you guys to test this
> > now!
>
> Seems to work fine, thanks! Except for the case if nmaster > n; in
> that case the calculate height of the last client seems to be a pixel
> or so to small. I didn't really think about it, but the attached patch
> seems to work around the problem.
> diff -r 6c8b43d7b616 layout.c
> --- a/layout.c Thu May 24 15:40:07 2007 +0200
> +++ b/layout.c Thu May 24 16:03:44 2007 +0200
> @@ -40,7 +40,7 @@ tile(void) {
> ny += i * mh;
> nw = mw - 2 * c->border;
> nh = mh;
> - if(i + 1 == nmaster) /* remainder */
> + if(i + 1 == nmaster || (n < nmaster && i + 1 == n)) /* remainder */
> nh = wah - mh * i;
> nh -= 2 * c->border;
> }
I pushed a slightly different version, which seemed more obvious
to me:
if(i + 1 == (n < nmaster ? n : nmaster)) /* remainder */
If there was a MIN macro, I could have used that as well,
if(i + 1 == MIN(n, nmaster)) ...
Regards,
-- Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361Received on Thu May 24 2007 - 16:27:45 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:42:50 UTC