optimize mh computing
This commit is contained in:
parent
d990643b5f
commit
b490276b66
|
@ -142,6 +142,7 @@ _tile(Display *disp, awesome_config *awesomeconf, const Bool right)
|
||||||
mh = mw = 0;
|
mh = mw = 0;
|
||||||
|
|
||||||
mw -= 2 * c->border;
|
mw -= 2 * c->border;
|
||||||
|
mh -= 2 * c->border;
|
||||||
|
|
||||||
if(otherwin < awesomeconf->ncols)
|
if(otherwin < awesomeconf->ncols)
|
||||||
real_ncols = otherwin;
|
real_ncols = otherwin;
|
||||||
|
@ -153,10 +154,9 @@ _tile(Display *disp, awesome_config *awesomeconf, const Bool right)
|
||||||
li = last_i ? i - last_i : i;
|
li = last_i ? i - last_i : i;
|
||||||
if(li < awesomeconf->nmaster)
|
if(li < awesomeconf->nmaster)
|
||||||
{ /* master */
|
{ /* master */
|
||||||
ny = way + li * mh;
|
ny = way + li * (mh + 2 * c->border);
|
||||||
nx = wax + (right ? 0: waw - (mw + 2 * c->border));
|
nx = wax + (right ? 0 : waw - (mw + 2 * c->border));
|
||||||
nh = mh - 2 * c->border;
|
resize(c, nx, ny, mw, mh, awesomeconf->resize_hints);
|
||||||
resize(c, nx, ny, mw, nh, awesomeconf->resize_hints);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* tile window */
|
{ /* tile window */
|
||||||
|
|
Loading…
Reference in New Issue