Add Modern One-to-One Trackpad Gestures on Wayland and Xorg - #13992
corbin-auriti wants to merge 2 commits into
Conversation
Refactor GesturesManager to support both touchegg (X11) and native clutter/libinput events (Wayland), since muffin's event handling differs enough between session types that touchegg is still needed for X11 for now. Gesture action behavior is otherwise unchanged. Follow-up fixes folded in: connect to screensaverController directly instead of a proxy, consolidate onto js/misc/mprisPlayer and drop mprisController.js, a few misc fixes, and halt event propagation when a gesture is cancelled. ref: linuxmint/wayland#99
Add tracked gestures. A tracked gesture follows the fingers. It updates as the fingers move. It commits or cancels when the fingers lift. Use tracked gestures for these actions: switch workspace, show Expo, show Scale, switch windows, tile a window, maximize a window, and minimize a window. Port the swipe-tracking math from GNOME Shell. Use this port for the native gesture path on Wayland. Use the same port for the touchegg gesture path on X11. Extend the Gestures settings page. Add a picture for each finger count. Tint each picture to match the theme. Add one-click templates for common setups; each also clears the gestures it does not use. List gesture rows up, down, left, then right. Filter the shown gestures by what the hardware and the session support. Add a link to this page from the Touchpad page. Fix bugs. The tile preview now shows what push_tile() will really do. The workspace scroll in Scale no longer fights its own animation. Resetting gestures no longer disables the feature. A template button no longer locks out the other button; only the highlight changes, and it follows whatever gestures are actually set. On X11, touchegg reads the touchpad through its own libinput handle, so disabling the touchpad did not stop gestures; GesturesManager now also checks the touchpad's own enabled state itself.
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect and will not replace a normal review.Found 2 potential issue(s):
|
Meta.disable_unredirect_for_display(global.display) in workspaceAnimation.js:350 Forces full compositing for every window during swipe animations, so every window's texture stays live so the clones animate smoothly |
Adds smooth "one-to-one" touchpad/touchscreen gestures that follow the fingers live and commit or cancel on release, for: switch workspace, Expo, Scale, switch windows (alt-tab), tile, maximize, minimize.
Contains @mtwebster 's native-gestures branch to allow classic one-shot gestures to work on wayland
Architecture Overview
gesturesManager.js -> nativeGestureSource.js (Wayland) OR toucheggGestureSource.js (X11) -> actions.js -> tracking.js -> drives actual actions like: tiling, Scale/Expo, window-switcher, maximize/minimize scale, workspace switching