mouse: keep mwfact within sensible bounds
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
7690dba009
commit
aa33631263
3
mouse.c
3
mouse.c
|
@ -661,6 +661,9 @@ mouse_client_resize_tiled(client_t *c)
|
||||||
else if(layout == layout_tiletop)
|
else if(layout == layout_tiletop)
|
||||||
mwfact = 1. - fact_y;
|
mwfact = 1. - fact_y;
|
||||||
|
|
||||||
|
/* keep mwfact within sensible bounds */
|
||||||
|
mwfact = MIN( MAX( 0.01, mwfact), 0.99 );
|
||||||
|
|
||||||
/* refresh layout */
|
/* refresh layout */
|
||||||
if(fabs(tag->mwfact - mwfact) >= 0.01)
|
if(fabs(tag->mwfact - mwfact) >= 0.01)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue