diff -Naur xf86-input-mouse-1.1.2/src/mouse.c xf86-input-mouse-1.1.2-ja/src/mouse.c --- xf86-input-mouse-1.1.2/src/mouse.c 2006-10-11 16:23:54.000000000 -0600 +++ xf86-input-mouse-1.1.2-ja/src/mouse.c 2007-04-21 18:45:23.000000000 -0600 @@ -213,7 +213,8 @@ OPTION_VMIN, OPTION_DRAGLOCKBUTTONS, OPTION_DOUBLECLICK_BUTTONS, - OPTION_BUTTON_MAPPING + OPTION_BUTTON_MAPPING, + OPTION_SENSITIVITY } MouseOpts; #ifdef XFree86LOADER @@ -257,6 +258,7 @@ { OPTION_DRAGLOCKBUTTONS, "DragLockButtons",OPTV_STRING, {0}, FALSE }, { OPTION_DOUBLECLICK_BUTTONS,"DoubleClickButtons", OPTV_STRING, {0}, FALSE }, { OPTION_BUTTON_MAPPING, "ButtonMapping", OPTV_STRING, {0}, FALSE }, + { OPTION_SENSITIVITY, "Sensitivity", OPTV_REAL, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; #endif @@ -799,6 +801,12 @@ xf86Msg(X_CONFIG, "%s: Resolution: %d\n", pInfo->name, pMse->resolution); } + + if (mPriv->sensitivity + = xf86SetRealOption(pInfo->options, "Sensitivity", 1.0)) { + xf86Msg(X_CONFIG, "%s: Sensitivity: %g\n", pInfo->name, + mPriv->sensitivity); + } } static void @@ -2348,10 +2356,13 @@ int dx, int dy, int dz, int dw) { MouseDevPtr pMse; + mousePrivPtr mousepriv; int zbutton = 0, wbutton = 0, zbuttoncount = 0, wbuttoncount = 0; int i, b, buttons = 0; pMse = pInfo->private; + mousepriv = (mousePrivPtr)pMse->mousePriv; + if (pMse->protocolID == PROT_MMHIT) b = reverseBits(hitachMap, truebuttons); else @@ -2441,6 +2452,15 @@ dy = tmp; } + /* Accumulate the scaled dx, dy in the private variables + fracdx,fracdy and return the integer number part */ + if (mousepriv) { + mousepriv->fracdx += mousepriv->sensitivity*dx; + mousepriv->fracdy += mousepriv->sensitivity*dy; + mousepriv->fracdx -= ( dx=(int)(mousepriv->fracdx) ); + mousepriv->fracdy -= ( dy=(int)(mousepriv->fracdy) ); + } + /* If mouse wheel movement has to be mapped on a button, we need to * loop for button press and release events. */ do { diff -Naur xf86-input-mouse-1.1.2/src/mousePriv.h xf86-input-mouse-1.1.2-ja/src/mousePriv.h --- xf86-input-mouse-1.1.2/src/mousePriv.h 2006-10-11 16:23:54.000000000 -0600 +++ xf86-input-mouse-1.1.2-ja/src/mousePriv.h 2007-04-21 18:34:49.000000000 -0600 @@ -64,6 +64,8 @@ int acc; CARD32 pnpLast; Bool disablePnPauto; + float fracdx,fracdy; + float sensitivity; } mousePrivRec, *mousePrivPtr; /* mouse proto flags */