Comment 16 for bug 926917

Revision history for this message
pgreenland (philip-pgreenland) wrote :

Hi,

Just added a Microsoft Laser Mouse 5000 to my pc and am now having this issue also...however I believe I may have found the cause (although I've only investigated briefly).

Having downloaded the xserver-xorg-input-evdev-udeb source package (http://packages.ubuntu.com/precise/xserver-xorg-input-evdev-udeb) the changelog contains mentions of merging a smooth scrolling branch on Wed Nov 9 16:01:48 2011 +1000.

evdev.c contains conditionally compiled code depending on whether smooth scrolling should be enabled as to how it handles the scrollwheels.

Either:

In EvdevProcessRelativeMotionEvent we have:
#ifndef HAVE_SMOOTH_SCROLLING
        case REL_WHEEL:
            if (value > 0)
                EvdevQueueButtonClicks(pInfo, wheel_up_button, value);
            else if (value < 0)
                EvdevQueueButtonClicks(pInfo, wheel_down_button, -value);
            break;

        case REL_DIAL:
        case REL_HWHEEL:
            if (value > 0)
                EvdevQueueButtonClicks(pInfo, wheel_right_button, value);
            else if (value < 0)
                EvdevQueueButtonClicks(pInfo, wheel_left_button, -value);
            break;
        /* We don't post wheel events as axis motion. */
#endif

Or:

In EvdevAddRelValuatorClass:

#ifdef HAVE_SMOOTH_SCROLLING
        if (axis == REL_WHEEL)
            SetScrollValuator(device, axnum, SCROLL_TYPE_VERTICAL, -1.0, SCROLL_FLAG_PREFERRED);
        else if (axis == REL_DIAL)
            SetScrollValuator(device, axnum, SCROLL_TYPE_VERTICAL, -1.0, SCROLL_FLAG_NONE);
        else if (axis == REL_HWHEEL)
            SetScrollValuator(device, axnum, SCROLL_TYPE_HORIZONTAL, -1.0, SCROLL_FLAG_NONE);
#endif

Before smooth scrolling, REL_WHEEL was mapped to vertical scrolling and REL_DIAL and REL_HWHEEL were mapped to horizontal scrolling. After smooth scrolling REL_WHEEL and REL_DIAL are mapped to verical scrolling and REL_HWHEEL is mapped to horizontal.

Fixed for me by changing the REL_DIAL axis to SCROLL_TYPE_HORIZONTAL.

I've attached a patch for the source which solved it for me. Suppose alternatively you could just remove the HAVE_SMOOTH_SCROLLING definition.

Thanks,

Phil