Bug 456383 - Add inertial scrolling to WheelHandler for touchpad and touchscreen scrolls
Summary: Add inertial scrolling to WheelHandler for touchpad and touchscreen scrolls
Status: CONFIRMED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-07-06 07:28 UTC by Andrew Shark
Modified: 2024-01-19 13:36 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Shark 2022-07-06 07:28:12 UTC
It is impossible to enable kinetic scrolling in KDE with libinput driver in System Settings.

We know that libinput driver does not implement inertial scrolling for touchpads, see https://wayland.freedesktop.org/libinput/doc/latest/faqs.html#kinetic-scrolling-does-not-work. Synaptic's driver "implementation" is just a crutch: it just keeps sending scroll events when you do swipe by fingers. But it does not care what is going on in the desktop, and causes some unfixable bugs.

We need a proper implementation in KDE.

STEPS TO REPRODUCE
1. Go to System Settings, Input Devices, Touchpad.
2. Search for Inertia Scrolling checkbox

OBSERVED RESULT
There is no such checkbox

EXPECTED RESULT
The checkbox should be available.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Bug 443819 (for okular), Bug 403285 (for konsole) - fixes for synaptics' implementation (ignoring ctrl while scroll events are sent).
Comment 1 Nate Graham 2022-07-06 15:44:14 UTC
If you're saying that we in KDE should forcibly inject inertia ourselves at the driver level (like Synaptics did), that's not really possible. On X11, we don't control the part of the stack where it would need to be implemented. On Wayland, we could do it, but our implementation will conflict with toolkits that already do it themselves, so there will be double-inertia all over the place, in addition to creating an endless number of other issues like Bug 443819 and Bug 403285. Imagine those everywhere. It's not really feasible.

The right approach is to implement inertia in toolkits' scrollviews. GTK and Electron already generally do this, and Qt also does for QtQuick-based software. We just need to turn it on, for the most part. There are a few complications, such as the fact that we actually override a lot of the default QtQuick scroll behaviors with something called WheelHandler which lives in Kirigami, so it would need to be implemented there. So I'll move this to Kirigami as the biggest thing that would need to be changed is WheelHandler.

For QtWidgets-based apps, it's largely hopeless, unfortunately. Someone would need to implement inertia in the QtWidgets scrollview, which seems unlikely as widgets are semi-frozen.
Comment 2 Nicolas Fella 2022-07-06 17:25:30 UTC
QScroller can be used to enable kinetic scrolling in QtWidgets apps. It's not a magic switch that enables it out-of-the-box everywhere though
Comment 3 Nate Graham 2022-07-06 17:37:21 UTC
Yes, it would have to be implemented in each of our five hundred million QtWidgets-based scrollviews, which was what led me to my conclusion that it would be "largely hopeless."
Comment 4 elvisvan 2023-03-24 11:30:14 UTC Comment hidden (spam)