https://bugs.kde.org/show_bug.cgi?id=464592

--- Comment #3 from John Brooks <j...@fastquake.com> ---
The proximate cause is indeed that commit. The second order cause is that
there's currently no good way for kwin to modify scroll speed in a way that
affects the things it should and doesn't break things it shouldn't. Sometimes
an application wants to scroll something for every "scroll wheel tick". For
example, scrolling through a list of tabs. This is what the axis_discrete value
is for. Take a look at the following events:

kwin_wayland dev, no deltav120 scroll factor patch, no scroll factor
    [2599589.845] wl_pointer@22.axis_source(0)
    [2599589.906] wl_pointer@22.axis_discrete(0, 1)
    [2599589.921] wl_poin...@22.axis(2369707, 0, 15.00000000)
    [2599589.935] wl_pointer@22.frame()
+max scroll factor
    [2647199.034] wl_pointer@22.axis_source(0)
    [2647199.120] wl_pointer@22.axis_discrete(0, 20)
    [2647199.147] wl_poin...@22.axis(2417316, 0, 300.00000000)
    [2647199.170] wl_pointer@22.frame()

kwin_wayland dev, deltaV120 scroll factor patch, no scroll factor
    [3170612.194] wl_pointer@22.axis_source(0)
    [3170612.266] wl_pointer@22.axis_discrete(0, 1)
    [3170612.281] wl_poin...@22.axis(2940729, 0, 15.00000000)
    [3170612.296] wl_pointer@22.frame()
+max scroll factor
    [3204697.284] wl_pointer@22.axis_source(0)
    [3204697.347] wl_pointer@22.axis_discrete(0, 1)
    [3204697.363] wl_poin...@22.axis(2974814, 0, 300.00000000)
    [3204697.378] wl_pointer@22.frame()

The axis event value is supposed to be the angle by which the scroll wheel
moved, while the axis_discrete event value is supposed to be the number of
scroll wheel "ticks" that it has moved by. kwin's implementation of adjustable
scroll speed hinges on multiplying these values.

The problem is that if kwin_wayland sends an axis_discrete with a value of 20,
that tells the client that the scroll wheel has moved 20 "ticks", which is
incorrect. This would cause anything where you want to scroll just one "item"
per tick of the wheel to scroll 20 times instead. So the patch makes it so the
axis_discrete value is not multiplied. Only the axis value will be multiplied.

But Qt, and maybe other toolkits, don't provide a way for their applications to
distinguish between the discrete event and the axis event. Qt in particular
will ignore the axis event value if a discrete value is present. So kwin's
choice is to either multiply the discrete event (which will break anything that
relies on it), or not multiply it (which will prevent it from applying to
toolkits that don't handle it properly).

We're currently looking at ways to solve this.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to