Pinch-to-zoom skips a lot of pages at times
Steps to reproduce
- Open any PDF (with sufficient number of pages to reproduce, say 100) in Evince and go to a page in the middle of it (so that there exist pages to scroll to).
- Scroll up/down using the two-finger gesture on the touchpad and then lift the fingers (without letting the velocity of the fingers along the touchpad w.r.t. the touchpad get to zero when the fingers are in contact with it; maybe it is called kinetic scrolling). Then, do the two-finger pinch-to-zoom gesture before the scroll stops.
You should try and reproduce with the demos applications available under the
demos
directory, or the test programs in thetests
directory. Alternatively, please attach a small and self-contained example written in C that exhibits the issue.
(I can't figure out a way to do this, but) there is already an issue and when someone said that the conflicting gestures should be resolved in a component other than Evince, a developer said GTK.
Current behavior
Evince scrolls to a random page, sometimes very far, depending on the gesture duration and/or speed.
Expected outcome
If the gesture is done/interpreted incorrectly and there is some conflict, it should not scroll/skip to some random page far away.
Version information
- GTK Version:
$ rpm -q gtk2
gtk2-2.24.33-8.fc36.x86_64
$ rpm -q gtk3
gtk3-3.24.31-2.fc36.x86_64
$ rpm -q gtk4
gtk4-4.6.3-1.fc36.x86_64
- OS: Fedora Linux 36 (Workstation Edition), 64-bit, GNOME 42.1, Wayland
- Linux
5.17.6-300.fc36.x86_64
Additional information
libinput debug-events
returns Touchpad: libinput bug: invalid gesture event GESTURE_EVENT_PINCH in state GESTURE_STATE_NONE
when the problem occurs.
It might take multiple tries to reproduce it.
A recording of the touchpad with intentionally imperfect gestures for quick reproduction.
A screen recording. (The libinput recording does not correspond to this.)
This happens frequently, even when I do not scroll. (I never had any problem on Windows so the touchpad should be fine and my gestures should be good enough.) I notice this mostly when I zoom in after clicking a bookmark (because it resets the zoom level). Maybe when I start doing the gesture, initially it interprets it as scroll and then invalid gesture event GESTURE_EVENT_PINCH in state GESTURE_STATE_NONE
happens and it skips to some random page.
Edit: I disabled two-finger scrolling and the issue no longer exists. So there is a conflict between the two-finger scroll and two-finger pinch-to-zoom gestures.