Summary: | Add inertial scrolling to WheelHandler for touchpad and touchscreen scrolls | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kirigami | Reporter: | Andrew Shark <ashark> |
Component: | general | Assignee: | Marco Martin <notmart> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | CC: | bugs.kde.org, chermnykh2001, contact, d.edwards-dale, elvisisvan, Hi-Angel, hujq, kde-yyds, kimiblock, kripton, luna, nate, nicolas.fella, noahadvs, uwu |
Priority: | NOR | Keywords: | usability |
Version: | unspecified | ||
Target Milestone: | Not decided | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andrew Shark
2022-07-06 07:28:12 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. 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 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." even if there exist an "inertia scrolling" checkbox it will only effective on x11 because wayland hasn't natively implemented inertia scrolling system-wide, still I'm pushing commits to https://invent.kde.org/kde-yyds/kirigami-work/-/tree/work-kinetic-scroll It's still very buggy in some applications at the time. I will open a pull request when it's more usable. |