From c3ba206dc60f8aa0dc14970418d376a09b3ed4c1 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 9 Apr 2008 16:54:52 +0200 Subject: [PATCH] [mouse] Use mwfact lower and upper limits Signed-off-by: Julien Danjou --- mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mouse.c b/mouse.c index 759ad8b0..daef750e 100644 --- a/mouse.c +++ b/mouse.c @@ -372,8 +372,8 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused))) mwfact = (double) (ev.xmotion.y - area.y) / area.height; else mwfact = 1 - (double) (ev.xmotion.y - area.y) / area.height; - if(mwfact < 0.1) mwfact = 0.1; - else if(mwfact > 0.9) mwfact = 0.9; + mwfact = MAX(globalconf.screens[screen].mwfact_lower_limit, + MIN(globalconf.screens[screen].mwfact_upper_limit, mwfact)); if(fabs(curtags[0]->mwfact - mwfact) >= 0.01) { curtags[0]->mwfact = mwfact;