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




commit c7a26f4ea436449ed4549254442a7617564deeb2
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]