On 3/22/07, Johannes Klauser <[EMAIL PROTECTED]> 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)



Reply via email to