mouse: keep mwfact withing reasonable bounds again
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
a4953d13d5
commit
83a2fb66cf
3
mouse.c
3
mouse.c
|
@ -823,6 +823,9 @@ mouse_client_resize_magnified(client_t *c, bool infobox)
|
||||||
/* new master/rest ratio */
|
/* new master/rest ratio */
|
||||||
mwfact = dist / maxdist;
|
mwfact = dist / maxdist;
|
||||||
|
|
||||||
|
/* keep mwfact within reasonable bounds */
|
||||||
|
mwfact = MIN(MAX( 0.01, mwfact), 0.99);
|
||||||
|
|
||||||
/* refresh the layout */
|
/* refresh the layout */
|
||||||
if(fabs(tag->mwfact - mwfact) >= 0.01)
|
if(fabs(tag->mwfact - mwfact) >= 0.01)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue