[gnome-shell/wip/exalm/swipes] js/ui: Explicitly specify SwipeTracker orientation



commit 1890ea9fa1d5d9e75a7733b5dcf7a0a518e9ef43
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Feb 28 22:09:55 2021 +0500

    js/ui: Explicitly specify SwipeTracker orientation
    
    Avoid using the wrong value by default.

 js/ui/unlockDialog.js       | 1 +
 js/ui/workspaceAnimation.js | 1 +
 js/ui/workspacesView.js     | 1 +
 3 files changed, 3 insertions(+)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 974600ae54..c77394b0c2 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -497,6 +497,7 @@ var UnlockDialog = GObject.registerClass({
 
         this._swipeTracker = new SwipeTracker.SwipeTracker(
             this, Shell.ActionMode.UNLOCK_SCREEN);
+        this._swipeTracker.orientation = Clutter.Orientation.VERTICAL;
         this._swipeTracker.connect('begin', this._swipeBegin.bind(this));
         this._swipeTracker.connect('update', this._swipeUpdate.bind(this));
         this._swipeTracker.connect('end', this._swipeEnd.bind(this));
diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js
index 6cac580e71..468f558cd8 100644
--- a/js/ui/workspaceAnimation.js
+++ b/js/ui/workspaceAnimation.js
@@ -285,6 +285,7 @@ var WorkspaceAnimationController = class {
 
         const swipeTracker = new SwipeTracker.SwipeTracker(global.stage,
             Shell.ActionMode.NORMAL, { allowDrag: false });
+        swipeTracker.orientation = Clutter.Orientation.HORIZONTAL;
         swipeTracker.connect('begin', this._switchWorkspaceBegin.bind(this));
         swipeTracker.connect('update', this._switchWorkspaceUpdate.bind(this));
         swipeTracker.connect('end', this._switchWorkspaceEnd.bind(this));
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index fb9eafb0a8..966915cc8e 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -610,6 +610,7 @@ class WorkspacesDisplay extends St.Widget {
             Main.layoutManager.overviewGroup,
             Shell.ActionMode.OVERVIEW,
             { allowDrag: false });
+        this._swipeTracker.orientation = Clutter.Orientation.HORIZONTAL;
         this._swipeTracker.allowLongSwipes = true;
         this._swipeTracker.connect('begin', this._switchWorkspaceBegin.bind(this));
         this._swipeTracker.connect('update', this._switchWorkspaceUpdate.bind(this));


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