mouse: keep mwfact withing reasonable bounds again

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Michael Gehring 2008-06-15 21:20:36 +02:00 committed by Julien Danjou
parent a4953d13d5
commit 83a2fb66cf
1 changed files with 3 additions and 0 deletions

View File

@ -823,6 +823,9 @@ mouse_client_resize_magnified(client_t *c, bool infobox)
/* new master/rest ratio */
mwfact = dist / maxdist;
/* keep mwfact within reasonable bounds */
mwfact = MIN(MAX( 0.01, mwfact), 0.99);
/* refresh the layout */
if(fabs(tag->mwfact - mwfact) >= 0.01)
{