On 3/22/07, Johannes Klauser <J.Klauser_AT_gmx.net> wrote:
> Hi,
>
> I fixed a small bug in incnmaster: there was no check if nmaster matches
> the maximal number of clients of the current tag.
> No it behaves better, but it fails partially if tags have different number
> of clients. The only way to fix it completely is the combination with
> dfenze's 'Layout per tag - patch' (but I didn't test it).
>From what I understand by reading (not yet testing) this patch, I'd
say that this prohibits increasing nmaster to a number higher than the
current amount of clients in view, right? If so, I'd consider that
_introducing_ a bug, rather than fixing one...
Greets, Sander.
> Here is it:
>
> diff -r 2dec35ad6703 layout.c
> --- a/layout.c Mon Mar 05 11:54:59 2007 +0100
> +++ b/layout.c Thu Mar 22 20:05:15 2007 +0100
> @@ -135,13 +135,15 @@ incmasterw(const char *arg) {
>
> void
> incnmaster(const char *arg) {
> - int i;
> + int i, n;
> + Client *c;
>
> if(!arg)
> nmaster = NMASTER;
> else {
> i = atoi(arg);
> - if((lt->arrange != tile) || (nmaster + i < 1)
> + for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next),
> ++n);
> + if((n < nmaster + i || lt->arrange != tile) || (nmaster + i < 1)
> || (wah / (nmaster + i) <= 2 * BORDERPX))
> return;
> nmaster += i;
>
> Greetings
> Johannes
>
> --
> - Manche Menschen haben einen Gesichtkreis vom Radius Null und nennen ihn
> ihren Standpunkt -
> David Hilbert (1862-1943)
>
>
Received on Fri Mar 23 2007 - 09:10:59 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:40:04 UTC