Implement touchpad pinch gestures in gala - #2907
Conversation
460f9a9 to
f6d934a
Compare
|
This differs from the existing pinch behavior because of mutter's "gesture cancel" thing. If you set pinch-to-zoom in System Settings and use it, when you run out of space on your touchpad, the zoom resets. The same thing happens when you add a 4th finger, for example. But in That's what mutter source code says: TBH I think we need to preserve both behaviors (for example, cancellation may be useful for #1804), but this just doesn't work with zoom |
Should be fixed now
For now it just treats cancel as end. If we ever want to allow cancelling a gesture here it will be trivial to add a boolean allow_cancel or something that just emits on end with 0 progress on cancel. |
03704a1 to
ae96b76
Compare
Towards #2751 since touchegg is no longer packaged for OS9. With this only touchscreen is left to do.
First rename the TouchpadBackend to TouchpadSwipeBackend, then introduce TouchpadPinchBackend.
Note that unfortunately in mutter 46 which we use on OS8 a bug was introduced that pinch gestures are captured by wayland clients i.e. they aren't forwarded to us when over a window:
https://gitlab.gnome.org/GNOME/mutter/-/work_items/3505
This was fixed for GNOME 49 so it isn't a problem for our OS9 but unfortunately it wasn't back ported :/
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4417
Therefore I added build conditions that on mutter < 49 we still use touchegg and on mutter 49 or higher we use the new backend. So if you are on mutter < 49 to test this you have to comment out the build conditions to enable the new TouchpadPinchBackend (in GlobalTrigger) and to filter out pinch gesture from touchegg (in ToucheggBackend). Then you can test this over any non window elements, e.g. in the multitasking view or over the background.