[hackers] [dwm] allow 0 nmaster || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Mon, 31 Oct 2011 20:09:32 +0100 (CET)

changeset: 1583:904e923827cb
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Mon Oct 31 20:09:27 2011 +0100
files: dwm.c
description:
allow 0 nmaster


diff -r f7fb8588b543 -r 904e923827cb dwm.c
--- a/dwm.c Sun Oct 30 12:14:34 2011 +0100
+++ b/dwm.c Mon Oct 31 20:09:27 2011 +0100
_AT_@ -1028,7 +1028,7 @@
 
 void
 incnmaster(const Arg *arg) {
- selmon->nmaster = MAX(selmon->nmaster + arg->i, 1);
+ selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
         arrange(selmon);
 }
 
_AT_@ -1666,8 +1666,10 @@
         if(n == 0)
                 return;
 
- mw = (n > m->nmaster) ? m->ww * m->mfact : m->ww;
-
+ if(n > m->nmaster)
+ mw = m->nmaster ? m->ww * m->mfact : 0;
+ else
+ mw = m->ww;
         for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
                 if(i < m->nmaster) {
                         h = (m->wh - my) / (MIN(n, m->nmaster) - i);
Received on Mon Oct 31 2011 - 20:09:32 CET

This archive was generated by hypermail 2.3.0 : Mon Oct 31 2011 - 20:12:04 CET