From dfe8abd49601deb23badbf36115775c1f8ba0e9e Mon Sep 17 00:00:00 2001 From: Mathieu TUDISCO Date: Thu, 17 Apr 2025 12:41:35 +0200 Subject: [PATCH] feat: improve tab switching with trackpad --- src/zen/workspaces/ZenWorkspaces.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index f78843d47..bee16429c 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -466,6 +466,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { this._swipeState.direction = delta > 0 ? 'left' : 'right'; } + if (Math.abs(translateX) >= 40) { + return this._handleSwipeEnd(event); + } + // Apply a translateX to the tab strip to give the user feedback on the swipe const currentWorkspace = this.activeWorkspace; this._organizeWorkspaceStripLocations({ uuid: currentWorkspace }, true, translateX);