Fixed canvas "jump" on finger touches.
Further touch handling fixes!
In !333 (comment 47474) @dkazakov observed that the canvas "jumps" randomly when the user's fingers leave or touch the canvas.
This is due to the QTouchEvent with unreliable touch positions also firing in the form of a QGestureEvent with equally dubious positions, and that event bubbling up all the way to the parent QAbstractScrollArea.
So we just prevent QGestureEvent events from bubbling up to the parent QAbstractScrollArea, and call it a day.
Test Plan
- Build and start Krita on Linux
- Plug a Wacom Intuos tablet
- Configure the tablet to report raw events (for instance with "xsetwacom --set "Wacom Intuos Pro M Finger touch" Gesture off")
- Place and remove fingers on tablet multiple times.
- Observe that the canvas no longer "jumps" around.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.