Summary: | Ctrl+Scroll to zoom is incompatible with inertia touchpads | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Roberto <r087r70> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | aacid, elvisisvan, spaaaaaam |
Priority: | NOR | ||
Version: | 21.08.1 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Roberto
2021-10-16 07:20:01 UTC
This is exactly what it is supposed to do, i don't understand why it should not do that? Don't press Ctrl if you don't want to change the zoom? Maybe I did not explain myself clearly. The problem occurs when one scrolls fast with the touchpad and then raises the hand so that due to inertia the page keeps scrolling. During such inertia scrolling (withouth any touchpad contact), if one presses ctrl (for example ctrl+f to find some text, or other shortcuts with ctrl) the page becomes huge or minute, depending on the scroll direction. *inertia* triggering zoom is definitely not "what it is supposed to do", because one cannot control the zoom level in that way. I see two ways to solve this bug: 1) ctrl+scroll shortcut to zoom acting only until fingers are in contact with the touchpad 2) provide an option to disable ctrl+scroll to zoom the page I think the second way is clean and simple, and I would vote for it. > Ctrl+Scroll to zoom is incompatible with inertia touchpads
As I understood it, this is the main reason why inertia is nowadays no longer done in the touchpad driver. So:
3) Disable inertia in your touchpad driver.
Qt (the GUI framework used by Okular) provides a concept to communicate when the finger is lifted from the touchpad while scrolling. But to my knowledge, touchpad drivers do not communicate this. Implementing suggestion 1 in Okular would probably be unreliable.
Suggestion 2 seems most realistic, but I think we are concerned about bloating the configuration dialog.
Inertia is a feature that I use a lot in okulaŗ, and I'm happy with it. The fact that it conflicts with a shortcut is a bug that one should be able to prevent. It's not clear to me how is it possible that okular doesn't know when the finger is lifted: how otherwise would okular control inertia and scrolling? Beside solving the above issue, which I believe is the main bug source, IMO the situation requires that one should be able at least to remove or change the shortcut, whether in the gui or not: if you don't like to bloat the config dialog please add an alternative way to disable/change it. For example by manual modification of a config file? I understood your bug report in the way that your touchpad driver implements inertia. Okular does not have inertia for scroll input, because of the problem I have outlined. It only has inertia for swipe (flick) gesture input. If you observe inertia after scrolling with the touchpad, that is because your touchpad driver implements it. Okular just does what your hardware tells it to do. --- In case you can compile Okular from source, you can search for Qt::ControlModifier in PageView::wheelEvent(). It’s located in part/pageview.cpp around line 3200, and the source code is available at https://invent.kde.org/graphics/okular. If you remove the if branch with this Qt::ControlModifier, your Okular will not zoom with Ctrl+scroll. :) (In reply to David Hurka from comment #5) > Okular does not have inertia for scroll input, because of the problem I have > outlined. It only has inertia for swipe (flick) gesture input. If you > observe inertia after scrolling with the touchpad, that is because your > touchpad driver implements it. > > Okular just does what your hardware tells it to do. I see. Then I agree that solution (1) is not possible. > In case you can compile Okular from source, you can search for > Qt::ControlModifier in PageView::wheelEvent(). It’s located in > part/pageview.cpp around line 3200, and the source code is available at > https://invent.kde.org/graphics/okular. > > If you remove the if branch with this Qt::ControlModifier, your Okular will > not zoom with Ctrl+scroll. :) yes, thanks, but that implies that I would need to recompile at each update. Not a long term solution. Why not putting a flag in okularpartrc? Many other users have this problem, and it's a general kde bug which is around since almost 10 years https://bugs.freedesktop.org/show_bug.cgi?id=76094 and still not fixed. Some dev please put an option to disable it. By the way, I've found out that the very same bug was fixed in kate and then in konsole: https://bugs.kde.org/show_bug.cgi?id=403285 Therefore it must be actually fixable also in Okular. *** Bug 353330 has been marked as a duplicate of this bug. *** Okay, thanks for the link. These workarounds can probably be adapted to Okular. https://commits.kde.org/ktexteditor/f51befdc80b1a8dfd65b800b3b10dba97d10a2cb https://commits.kde.org/konsole/1af0a1d53399a4a0b3ccdd043cc9a7db30e659e0 and here i am been desperately trying for weeks to implement this exact same thing on my fedora kde plasma wayland system, inertia scrolling and touchpad gestures (4-finger tap to play/pause & swipe to adjust volume) are the 2 biggest linux hiccups for me to comfortably forget windows, and looks like i'm here too early for wayland to have them natively supported :( (In reply to Albert Astals Cid from comment #1) > This is exactly what it is supposed to do, i don't understand why it should > not do that? > > Don't press Ctrl if you don't want to change the zoom? more accurately is "if you're gonna switch application, stop the scrol, it's a feature you're using it wrong" (In reply to elvisvan from comment #11) > more accurately is "if you're gonna switch application, stop the scrol, it's > a feature you're using it wrong" your reply as if you have read only comment 1 and not the full thread it's not a feature, but rather an (unwanted) interference between features |