layout: Fix set_mwfact for all tile* function
This commit is contained in:
parent
8799c9eab2
commit
c1cf5ad27a
25
src/layout.c
25
src/layout.c
@ -160,7 +160,8 @@ uicb_set_mwfact(uicb_t cmd)
|
|||||||
return;
|
return;
|
||||||
if(tags[seltag].mwfact + c > 0.95
|
if(tags[seltag].mwfact + c > 0.95
|
||||||
|| tags[seltag].mwfact + c < 0.05
|
|| tags[seltag].mwfact + c < 0.05
|
||||||
|| tags[seltag].layout.func != tile)
|
|| tags[seltag].layout.func == maxlayout
|
||||||
|
|| tags[seltag].layout.func == freelayout)
|
||||||
return;
|
return;
|
||||||
tags[seltag].mwfact += c;
|
tags[seltag].mwfact += c;
|
||||||
arrange();
|
arrange();
|
||||||
@ -201,24 +202,20 @@ multi_tile(Position type)
|
|||||||
: tags[seltag].mwfact * sgeo.width;
|
: tags[seltag].mwfact * sgeo.width;
|
||||||
|
|
||||||
/* MASTER SIZE */
|
/* MASTER SIZE */
|
||||||
switch(type)
|
if(type == Top || type == Bottom)
|
||||||
{
|
{
|
||||||
case Top:
|
|
||||||
case Bottom:
|
|
||||||
mastergeo.width = (sgeo.width / nmaster) - border;
|
|
||||||
mastergeo.height = (n <= nmaster) ? sgeo.height - border : mwfact;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
case Left:
|
|
||||||
case Right:
|
|
||||||
mastergeo.width = (n <= nmaster) ? sgeo.width - border : mwfact;
|
|
||||||
mastergeo.height = (sgeo.height / nmaster) - border;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(type == Top)
|
if(type == Top)
|
||||||
mastergeo.y = (n <= nmaster) ? sgeo.y : sgeo.y + (sgeo.height - mwfact) - border;
|
mastergeo.y = (n <= nmaster) ? sgeo.y : sgeo.y + (sgeo.height - mwfact) - border;
|
||||||
|
mastergeo.width = (sgeo.width / nmaster) - border;
|
||||||
|
mastergeo.height = (n <= nmaster) ? sgeo.height - border : mwfact;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if(type == Left)
|
if(type == Left)
|
||||||
mastergeo.x = (n <= nmaster) ? sgeo.x : sgeo.width - mwfact - border;
|
mastergeo.x = (n <= nmaster) ? sgeo.x : sgeo.width - mwfact - border;
|
||||||
|
mastergeo.width = (n <= nmaster) ? sgeo.width - border : mwfact;
|
||||||
|
mastergeo.height = (sgeo.height / nmaster) - border;
|
||||||
|
}
|
||||||
|
|
||||||
/* TILED SIZE */
|
/* TILED SIZE */
|
||||||
if(n > nmaster)
|
if(n > nmaster)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user