From 18e11759c491af601030fb07417988ca8c6b02bd Mon Sep 17 00:00:00 2001 From: jtzero ? Date: Tue, 24 Dec 2024 22:48:44 -0500 Subject: [PATCH] do-not-animate-on-three-touch-lateral-swipe --- .../workspacePopup/workspaceAnimation.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/wsmatrix@martin.zurowietz.de/workspacePopup/workspaceAnimation.js b/wsmatrix@martin.zurowietz.de/workspacePopup/workspaceAnimation.js index 900016e..687e69e 100644 --- a/wsmatrix@martin.zurowietz.de/workspacePopup/workspaceAnimation.js +++ b/wsmatrix@martin.zurowietz.de/workspacePopup/workspaceAnimation.js @@ -218,6 +218,22 @@ const MonitorGroup = GObject.registerClass({ }); export class WorkspaceAnimationController extends GWorkspaceAnimationController { + animateSwitch(from, to, direction, onComplete) { + if (this._isSwipeEvent()) { + switch (direction) { + case Meta.MotionDirection.RIGHT: + case Meta.MotionDirection.LEFT: + return onComplete(); + case Meta.MotionDirection.DOWN: + case Meta.MotionDirection.UP: + console.log("animateSwitch touch up or down", direction); + super.animateSwitch(from, to, direction, onComplete); + return onComplete(); + } + } else { + super.animateSwitch(from, to, direction, onComplete); + } + } _prepareWorkspaceSwitch(workspaceIndices) { if (this._switchData) return; @@ -253,4 +269,7 @@ export class WorkspaceAnimationController extends GWorkspaceAnimationController Meta.disable_unredirect_for_display(global.display); } + _isSwipeEvent() { + return Clutter.get_current_event() === null; + } }