[gnome-shell/wip/carlosg/sanitize-gestures: 20/21] swipeTracker: Set up TouchSwipeGesture in the capture phase




commit 7abdd1b1da5e5a1c5ea76bba3583f13b5ccf77bf
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Sep 27 22:44:37 2021 +0200

    swipeTracker: Set up TouchSwipeGesture in the capture phase
    
    Use the new API to specify the gesture phase.

 js/ui/swipeTracker.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/swipeTracker.js b/js/ui/swipeTracker.js
index 4546b76b61..eb93cb945c 100644
--- a/js/ui/swipeTracker.js
+++ b/js/ui/swipeTracker.js
@@ -493,7 +493,7 @@ var SwipeTracker = GObject.registerClass({
         this.bind_property('orientation', this._touchGesture, 'orientation',
             GObject.BindingFlags.SYNC_CREATE);
         this.bind_property('distance', this._touchGesture, 'distance', 0);
-        global.stage.add_action(this._touchGesture);
+        global.stage.add_action_full("swipe", Clutter.EventPhase.CAPTURE, this._touchGesture);
 
         if (params.allowDrag) {
             this._dragGesture = new TouchSwipeGesture(allowedModes, 1,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]