From aa33631263f1ec6c89bf6e8b14d429843b80bb50 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Sat, 14 Jun 2008 23:37:48 +0200 Subject: [PATCH] mouse: keep mwfact within sensible bounds Signed-off-by: Julien Danjou --- mouse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mouse.c b/mouse.c index 29357a7d..ee1e1ed4 100644 --- a/mouse.c +++ b/mouse.c @@ -661,6 +661,9 @@ mouse_client_resize_tiled(client_t *c) else if(layout == layout_tiletop) mwfact = 1. - fact_y; + /* keep mwfact within sensible bounds */ + mwfact = MIN( MAX( 0.01, mwfact), 0.99 ); + /* refresh layout */ if(fabs(tag->mwfact - mwfact) >= 0.01) {