Bug 430532

Summary: Vertical scrolling broken for input devices with horizontal scrolling component (e.g. touchpad, trackpoint)
Product: [Applications] dolphin Reporter: mantapeppe
Component: view-engine: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kfm-devel, nate, nxtv2.0
Priority: NOR Keywords: regression
Version: 20.11.80   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 20.12.1
Attachments: Compare angleDelta().x() and angleDelta().y() to determine scroll direction

Description mantapeppe 2020-12-18 10:25:55 UTC
Scrolling in a vertical direction with a touchpad is stuttery and doesn't maintain scroll inertia unless the movement is perfectly vertical. The bug is not present when using Dolphin 20.08.3; on my Arch install the issue appeared on version 20.12.0, but a build of version 20.11.80 from git contains the bug as well.

Steps to reproduce:
1. Install any Dolphin version >= 20.11.80 on a laptop
2. Open a directory with a long list of files
3. Scroll using the touchpad/trackpoint

Expected result: smooth scrolling that maintains inertia

Observed result: scrolling stops as soon as scrolling movement is not perfectly vertical


Additional information:
I believe the bug might be similar in nature to a Konsole bug reported a few months ago as the expected and observed behaviour are pretty much the same; the bug in question is

https://bugs.kde.org/show_bug.cgi?id=425765
Comment 1 Nate Graham 2020-12-18 17:38:18 UTC
Works for me with my trackpad. Are you using libinput or synaptics drivers?
Comment 2 mantapeppe 2020-12-18 18:06:23 UTC
Synaptics, but I'll try to check using libinput as well.
Comment 3 mantapeppe 2020-12-19 19:19:27 UTC
Scrolling using libinput works as expected, although scroll inertia is not preserved (I used the default libinput config so it might be because of that)
Comment 4 Nate Graham 2020-12-19 19:21:37 UTC
Sounds like it's a bug in the Synaptics drivers.

Unfortunately scroll inertia is not built into Libinput. Its developer believes, not unreasonably, that this is a feature the toolkit should handle, as doing it in the driver causes some unfixable bugs in apps. And sadly Qt is not great about supporting it in its scrollviews.
Comment 5 mantapeppe 2020-12-22 22:01:29 UTC
Created attachment 134272 [details]
Compare angleDelta().x() and angleDelta().y() to determine scroll direction

(In reply to Nate Graham from comment #4)
> Sounds like it's a bug in the Synaptics drivers.

Turns out it actually was a Dolphin bug... It's exactly the same as the Konsole one: assuming that a scroll event with and angleDelta().x() != 0 is definitely not a vertical scroll.

Applying this patch fixes the issue
Comment 6 mantapeppe 2020-12-22 22:35:29 UTC
Sent a merge request to the repo, guess I'll change the status of this bug to "fixed"

Merge request: https://invent.kde.org/system/dolphin/-/merge_requests/149
Comment 7 Nate Graham 2020-12-22 22:40:54 UTC
Not fixed until the merge request is merged. :)

Thanks for submitting it!
Comment 8 mantapeppe 2020-12-23 18:39:37 UTC
Git commit 303740c68af83f45be1bdea56a250397a83efa6a by Eduard Manta.
Committed on 23/12/2020 at 16:17.
Pushed by ngraham into branch 'release/20.12'.

Fix vertical scroll with horizontal component not being recognized properly

a scroll that includes an horizontal component != 0 might still be a vertical scroll

M  +2    -2    src/kitemviews/kitemlistcontainer.cpp

https://invent.kde.org/system/dolphin/commit/303740c68af83f45be1bdea56a250397a83efa6a
Comment 9 Nate Graham 2021-01-12 17:04:02 UTC
*** Bug 431410 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-01-12 17:23:50 UTC
*** Bug 431410 has been marked as a duplicate of this bug. ***