[mouse] Use mwfact lower and upper limits

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-09 16:54:52 +02:00
parent 4343771bc7
commit c3ba206dc6
1 changed files with 2 additions and 2 deletions

View File

@ -372,8 +372,8 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
mwfact = (double) (ev.xmotion.y - area.y) / area.height; mwfact = (double) (ev.xmotion.y - area.y) / area.height;
else else
mwfact = 1 - (double) (ev.xmotion.y - area.y) / area.height; mwfact = 1 - (double) (ev.xmotion.y - area.y) / area.height;
if(mwfact < 0.1) mwfact = 0.1; mwfact = MAX(globalconf.screens[screen].mwfact_lower_limit,
else if(mwfact > 0.9) mwfact = 0.9; MIN(globalconf.screens[screen].mwfact_upper_limit, mwfact));
if(fabs(curtags[0]->mwfact - mwfact) >= 0.01) if(fabs(curtags[0]->mwfact - mwfact) >= 0.01)
{ {
curtags[0]->mwfact = mwfact; curtags[0]->mwfact = mwfact;