diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index d031b8b673f..35007bcf2f5 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -13,7 +13,7 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { parseArgs } from 'vs/platform/environment/node/argv'; import product from 'vs/platform/product/node/product'; -import { IWindowSettings, MenuBarVisibility, IWindowConfiguration, ReadyState, IRunActionInWindowRequest, getTitleBarStyle } from 'vs/platform/windows/common/windows'; +import { IWindowSettings, MenuBarVisibility, IWindowConfiguration, ReadyState, getTitleBarStyle } from 'vs/platform/windows/common/windows'; import { Disposable, toDisposable } from 'vs/base/common/lifecycle'; import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; import { ICodeWindow, IWindowState, WindowMode } from 'vs/platform/windows/electron-main/windows'; @@ -40,14 +40,6 @@ export const defaultWindowState = function (mode = WindowMode.Normal): IWindowSt }; }; -interface IWorkbenchEditorConfiguration { - workbench: { - editor: { - swipeToNavigate: boolean - } - }; -} - interface ITouchBarSegment extends Electron.SegmentedControlSegment { id: string; } @@ -460,30 +452,6 @@ export class CodeWindow extends Disposable implements ICodeWindow { this.currentMenuBarVisibility = newMenuBarVisibility; this.setMenuBarVisibility(newMenuBarVisibility); } - - // Swipe command support (macOS) - if (isMacintosh) { - const config = this.configurationService.getValue(); - if (config && config.workbench && config.workbench.editor && config.workbench.editor.swipeToNavigate) { - this.registerSwipeListener(); - } else { - this._win.removeAllListeners('swipe'); - } - } - } - - private registerSwipeListener() { - this._win.on('swipe', (event: Electron.Event, cmd: string) => { - if (!this.isReady) { - return; // window must be ready - } - - if (cmd === 'left') { - this.send('vscode:runAction', { id: 'workbench.action.openPreviousRecentlyUsedEditor', from: 'mouse' } as IRunActionInWindowRequest); - } else if (cmd === 'right') { - this.send('vscode:runAction', { id: 'workbench.action.openNextRecentlyUsedEditor', from: 'mouse' } as IRunActionInWindowRequest); - } - }); } addTabbedWindow(window: ICodeWindow): void { diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index ed1b6622f90..37b4f848681 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -185,7 +185,6 @@ const configurationValueWhitelist = [ 'workbench.editor.enablePreviewFromQuickOpen', 'workbench.editor.showTabs', 'workbench.editor.highlightModifiedTabs', - 'workbench.editor.swipeToNavigate', 'workbench.sideBar.location', 'workbench.startupEditor', 'workbench.statusBar.visible', diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index dc449eb18c5..664cc45a74e 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -107,12 +107,6 @@ import { isMacintosh, isWindows, isLinux, isWeb } from 'vs/base/common/platform' 'description': nls.localize('revealIfOpen', "Controls whether an editor is revealed in any of the visible groups if opened. If disabled, an editor will prefer to open in the currently active editor group. If enabled, an already opened editor will be revealed instead of opened again in the currently active editor group. Note that there are some cases where this setting is ignored, e.g. when forcing an editor to open in a specific group or to the side of the currently active group."), 'default': false }, - 'workbench.editor.swipeToNavigate': { - 'type': 'boolean', - 'description': nls.localize('swipeToNavigate', "Navigate between open files using three-finger swipe horizontally."), - 'default': false, - 'included': isMacintosh && !isWeb - }, 'workbench.editor.mouseBackForwardToNavigate': { 'type': 'boolean', 'description': nls.localize('mouseBackForwardToNavigate', "Navigate between open files using mouse buttons four and five if provided."), diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 3286b47068e..93dacfeacde 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -986,7 +986,6 @@ interface IEditorPartConfiguration { openSideBySideDirection?: 'right' | 'down'; closeEmptyGroups?: boolean; revealIfOpen?: boolean; - swipeToNavigate?: boolean; mouseBackForwardToNavigate?: boolean; labelFormat?: 'default' | 'short' | 'medium' | 'long'; restoreViewState?: boolean;