allow nmaster to be 0

This commit is contained in:
Julien Danjou 2007-09-14 20:59:37 +02:00
parent 4d03dd3e53
commit 9cc12396a1
1 changed files with 7 additions and 4 deletions

View File

@ -50,8 +50,8 @@ uicb_setnmaster(Display *disp,
else else
{ {
nmaster = (int) compute_new_value_from_arg(arg, (double) nmaster); nmaster = (int) compute_new_value_from_arg(arg, (double) nmaster);
if(nmaster < 1) if(nmaster < 0)
nmaster = 1; nmaster = 0;
} }
if(sel) if(sel)
@ -152,12 +152,15 @@ _tile(Display *disp, awesome_config *awesomeconf, const Bool right)
else else
{ /* tile window */ { /* tile window */
nh = wah / otherwin_screen - 2 * c->border; nh = wah / otherwin_screen - 2 * c->border;
nw = waw - mw - 2 * c->border; if(nmaster)
nw = waw - mw - 2 * c->border;
else
nw = waw - 2 * c->border;
if(li == nmaster) if(li == nmaster)
ny = way; ny = way;
else else
ny = way + (wah / otherwin_screen) * (li - nmaster_screen); ny = way + (wah / otherwin_screen) * (li - nmaster_screen);
if(right) if(right && nmaster)
nx = mw + wax; nx = mw + wax;
else else
nx = wax; nx = wax;