Hi,

 >> I'm using a Logitech MouseManPlus USB (also works when using a USB-PS/2
 >> adapter).
 >> Current setup: Linux kernel 2.4.15-pre5, XFree86 from CVS (Nov. 24th).
 >>
 >> Bug: Mouse wheel does not work with xterm/mozilla/any X app when using
 >> USB mouse and Input core driver whereas it works with the PS/2 adapter.
 >
 >I have exactly the same mouse and almost the same setup, but I have the
 >following lines in XF86Config (slightly different from your version) :
 >
 >Section "InputDevice"
 >    Identifier  "Mouse1"
 >    Driver      "mouse"
 >    Option      "Protocol" "ImPS/2"
 >    Option      "Device" "/dev/input/mice"
 >    Option      "ZAxisMapping" "4 5"
 >    Option      "Emulate3Buttons" "no"
 >    Option      "SampleRate" "200"
 >EndSection
 >
 >I hope this helps.

Yes, it helped, I changed Protocol from "MouseManPlusPS/2" to "ImPS/2" 
and wheel mouse now works when my Logitech MouseManPlus is plugged in 
USB mode + input core driver.

So, I guess it's a very specific bug in the MouseManPlusPS/2 driver ?

A quick look at xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c shows 
this driver is the most sophisticated:

With all the special cases, it might be missing the case where the input 
core driver is used and mouse is plugged in via USB ?

[...]
         case PROT_MMPS2:        /* MouseMan+ PS/2 */
             buttons = (pBuf[0] & 0x04) >> 1 |       /* Middle */
                       (pBuf[0] & 0x02) >> 1 |       /* Right */
                       (pBuf[0] & 0x01) << 2;        /* Left */
             dx = (pBuf[0] & 0x10) ? pBuf[1] - 256 : pBuf[1];
             if (((pBuf[0] & 0x48) == 0x48) &&
                 (abs(dx) > 191) &&
                 ((((pBuf[2] & 0x03) << 2) | 0x02) == (pBuf[1] & 0x0f))) {
                 /* extended data packet */
                 switch ((((pBuf[0] & 0x30) >> 2) | ((pBuf[1] & 0x30) >> 
4))) {
                 case 1:         /* wheel data packet */
                     buttons |= ((pBuf[2] & 0x10) ? 0x08 : 0) | /* 4th 
button */
                                ((pBuf[2] & 0x20) ? 0x10 : 0);  /* 5th 
button */
                     dx = dy = 0;
                     dz = (pBuf[2] & 0x08) ? (pBuf[2] & 0x0f) - 16 :
                                             (pBuf[2] & 0x0f);
                     break;
                 case 2:         /* Logitech reserves this packet type */
                     /*
                      * IBM ScrollPoint uses this packet to encode its
                      * stick movement.
                      */
                     buttons |= (pMse->lastButtons & ~0x07);
                     dx = dy = 0;
                     dz = (pBuf[2] & 0x80) ? ((pBuf[2] >> 4) & 0x0f) - 16 :
                                             ((pBuf[2] >> 4) & 0x0f);
                     dw = (pBuf[2] & 0x08) ? (pBuf[2] & 0x0f) - 16 :
                                             (pBuf[2] & 0x0f);
                     break;
                 case 0:         /* device type packet - shouldn't happen */
                 default:
                     buttons |= (pMse->lastButtons & ~0x07);
                     dx = dy = 0;
                     dz = 0;
                     break;
                 }
             } else {
                 buttons |= (pMse->lastButtons & ~0x07);
                 dx = (pBuf[0] & 0x10) ?    pBuf[1]-256  :  pBuf[1];
                 dy = (pBuf[0] & 0x20) ?  -(pBuf[2]-256) : -pBuf[2];
             }
             break;
[...]

-- 
[EMAIL PROTECTED]

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to