[gnome-shell/wip/exalm/gestures] asd



commit 2a45a373f85b0f56fbf8442dce1c2a7f8af0f77c
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Thu Jun 27 20:51:18 2019 +0500

    asd

 js/ui/swipeTracker.js   | 44 ++++++++++++++++++++++++++++++++++++++++++++
 js/ui/workspacesView.js |  4 ++--
 2 files changed, 46 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/swipeTracker.js b/js/ui/swipeTracker.js
index 45cffeb42..b90615bde 100644
--- a/js/ui/swipeTracker.js
+++ b/js/ui/swipeTracker.js
@@ -109,6 +109,50 @@ var TouchSwipeGesture = GObject.registerClass({
     }
 });
 
+/*var DragGesture = GObject.registerClass({
+    Signals: { 'update': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE] },
+               'end':    { param_types: [GObject.TYPE_UINT] },
+               'cancel': { param_types: [GObject.TYPE_UINT] }},
+}, class PanGesture extends Clutter.DragAction {
+    _init(actor, shouldSkip) {
+        super._init();
+
+        this._actor = actor;
+        this._shouldSkip = shouldSkip;
+    }
+
+    vfunc_drag_begin(actor, x, y, modifiers) {
+        
+    }
+
+    vfunc_drag_motion(actor, x, y, modifiers) {
+        
+    }
+
+});*/
+/*
+let panAction = new Clutter.PanAction({ trigger_edge: Clutter.TriggerEdge.AFTER });
+        panAction.connect('pan', this._onPan.bind(this));
+        panAction.connect('gesture-begin', () => {
+            if (this._workspacesOnlyOnPrimary) {
+                let event = Clutter.get_current_event();
+                if (this._getMonitorIndexForEvent(event) != this._primaryIndex)
+                    return false;
+            }
+
+            this._startSwipeScroll();
+            return true;
+        });
+        panAction.connect('gesture-cancel', () => {
+            clickAction.release();
+            this._endSwipeScroll();
+        });
+        panAction.connect('gesture-end', () => {
+            clickAction.release();
+            this._endSwipeScroll();
+        });
+        Main.overview.addAction(panAction);
+*/
 // USAGE:
 //
 // To correctly implement the gesture, the implementer must implement handlers for the
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 9f249a62c..9e2034262 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -441,7 +441,7 @@ var WorkspacesDisplay = class {
         });
         Main.overview.addAction(clickAction);
         this.actor.bind_property('mapped', clickAction, 'enabled', GObject.BindingFlags.SYNC_CREATE);
-
+/*
         let panAction = new Clutter.PanAction({ trigger_edge: Clutter.TriggerEdge.AFTER });
         panAction.connect('pan', this._onPan.bind(this));
         panAction.connect('gesture-begin', () => {
@@ -464,7 +464,7 @@ var WorkspacesDisplay = class {
         });
         Main.overview.addAction(panAction);
         this.actor.bind_property('mapped', panAction, 'enabled', GObject.BindingFlags.SYNC_CREATE);
-
+*/
         let allowedModes = Shell.ActionMode.OVERVIEW;
         let swipeTracker = new SwipeTracker.SwipeTracker(global.stage, allowedModes); // TODO: somehow teach 
it to work with addAction() too
         swipeTracker.connect('begin', this._switchWorkspaceBegin.bind(this));


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