[gnome-shell/wip/exalm/gestures: 9/21] e
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/gestures: 9/21] e
- Date: Wed, 26 Jun 2019 09:30:52 +0000 (UTC)
commit 1060c51301cbbe4c0fbcae3f851604cb16c99eef
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sun Jun 23 19:52:26 2019 +0500
e
js/ui/windowManager.js | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index faacb9b0a..9b34cb971 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1125,18 +1125,24 @@ var WindowManager = class {
let activeWorkspace = workspaceManager.get_active_workspace();
if (this._switchData && this._switchData.gestureActivated) {
+ Tweener.removeTweens(this._switchData.container);
+
let currWs = global.workspace_manager.get_active_workspace();
let topWs = activeWorkspace.get_neighbor(Meta.MotionDirection.UP);
let bottomWs = activeWorkspace.get_neighbor(Meta.MotionDirection.DOWN);
- let [xDestTop, yDestTop] = this._getPositionForDirection(direction, currWs, topWs);
- let [xDestBottom, yDestBottom] = this._getPositionForDirection(direction, currWs, bottomWs);
+ let [xDestTop, yDestTop] = this._getPositionForDirection(Meta.MotionDirection.UP, currWs, topWs);
+ let [xDestBottom, yDestBottom] = this._getPositionForDirection(Meta.MotionDirection.DOWN,
currWs, bottomWs);
+ let [x, y] = this._switchData.container.get_position();
-// xDestTop = -xDestTop;
+ xDestTop = -xDestTop;
yDestTop = -yDestTop;
-// xDestBottom = -xDestBottom;
+ xDestBottom = -xDestBottom;
yDestBottom = -yDestBottom;
- this._swipeTracker.continueFrom(0);
+ // TODO: horizontal
+ let progress = y / (y > 0 ? -yDestTop : yDestBottom);
+
+ this._swipeTracker.continueFrom(progress);
return;
}
@@ -1178,12 +1184,11 @@ var WindowManager = class {
return;
let switchData = this._switchData;
- this._switchData = null;
Tweener.addTween(switchData.container,
{ x: 0,
y: 0,
time: duration,
- transition: 'easeOutQuad',
+ transition: 'easeOutCubic',
onComplete: this._finishWorkspaceSwitch,
onCompleteScope: this,
onCompleteParams: [switchData],
@@ -1192,7 +1197,6 @@ var WindowManager = class {
_switchWorkspaceAnimate(direction, duration, newWs) {
let switchData = this._switchData;
- this._switchData = null;
let oldWs = global.workspace_manager.get_active_workspace();
let [xDest, yDest] = this._getPositionForDirection(direction, oldWs, newWs);
@@ -1204,7 +1208,7 @@ var WindowManager = class {
{ x: xDest,
y: yDest,
time: duration,
- transition: 'easeOutQuad',
+ transition: 'easeOutCubic',
onComplete: this._switchAndFinishWorkspaceSwitch,
onCompleteScope: this,
onCompleteParams: [newWs, switchData],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]