SUMMARY Fast scrolling on the page-number input box causes okular to lose most of the events/scroll erratically. This is especially bad with mice that support 'infinite scrolling' (removes resistance that stops the wheel after being spun) I am pretty sure this has worked perfectly fine in the past. STEPS TO REPRODUCE 1. Open .pdf with many pages 2. Scroll very fast OBSERVED RESULT The page number jumps around while okular doesn't actually scroll more than a couple of pages. It looks very much like the page number is rapidly reset to the currently visible page from the slowly scrolling document. I also tested with a high-res scrolling touchpad on current master and it is even worse there, often it can't even leave the first page. EXPECTED RESULT Okular should not miss/ignore input events and scroll one page per discrete (ie. not high-resolution) scroll event. For high-res scrolling I don't know what exactly the solution would be. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.20.5 on X11 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 Kernel Version: 5.10.10-arch1-1 AND Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.21.80 on Wayland KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2 Kernel Version: 5.11.0-rc5-generic OS Type: 64-bit Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics Memory: 15,1 GiB of RAM Graphics Processor: AMD RENOIR
Probably caused by the smooth scrolling patches "oh no i can't scroll to that new page because i'm already scrolling".
Ah yup, can reproduce. That's probably the reason indeed.
You can check that by unchecking “use smooth scrolling” in the config dialog. It’s now the first checkbox in that dialog. The problem is probably that PageView reports “viewport changed” at every scroll step (60Hz), and then the DocumentObserver mechanism reports the new viewport to the page number widget. (Similar to how the viewport is reported to the thumbnails bar.) I. e. exactly this: > It looks very much like the page number is rapidly reset to the > currently visible page from the slowly scrolling document.
I just want to throw in that that the problem still exists, and is much worse with most modern high-res touchpads (which support pixel scrolling), because it's almost impossible to "scroll slowly". Touchpads continuously generates scrolling events, they should instead be accumulated until a full "line" has been scrolled instead of trying to scroll a full page for each pixel scrolled