electron 3.0.x: remove window.smoothScrollingWorkaround setting
This commit is contained in:
parent
95ba24b268
commit
b3e5d256a2
|
@ -151,7 +151,6 @@ function onReady() {
|
|||
function configureCommandlineSwitches(cliArgs, nodeCachedDataDir) {
|
||||
|
||||
// Force pre-Chrome-60 color profile handling (for https://github.com/Microsoft/vscode/issues/51791)
|
||||
// TODO@Ben check if future versions of Electron still support this flag
|
||||
app.commandLine.appendSwitch('disable-features', 'ColorCorrectRendering');
|
||||
|
||||
// Support JS Flags
|
||||
|
|
|
@ -424,34 +424,6 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
|||
|
||||
// Handle Workspace events
|
||||
this._register(this.workspacesMainService.onUntitledWorkspaceDeleted(e => this.onUntitledWorkspaceDeleted(e)));
|
||||
|
||||
// TODO@Ben workaround for https://github.com/Microsoft/vscode/issues/13612
|
||||
// It looks like smooth scrolling disappears as soon as the window is minimized
|
||||
// and maximized again. Touching some window properties "fixes" it, like toggling
|
||||
// the visibility of the menu.
|
||||
if (isWindows) {
|
||||
const windowConfig = this.configurationService.getValue<IWindowSettings>('window');
|
||||
if (windowConfig && windowConfig.smoothScrollingWorkaround === true) {
|
||||
let minimized = false;
|
||||
|
||||
const restoreSmoothScrolling = () => {
|
||||
if (minimized) {
|
||||
const visibility = this.getMenuBarVisibility();
|
||||
const temporaryVisibility: MenuBarVisibility = (visibility === 'hidden' || visibility === 'toggle') ? 'default' : 'hidden';
|
||||
setTimeout(() => {
|
||||
this.doSetMenuBarVisibility(temporaryVisibility);
|
||||
this.doSetMenuBarVisibility(visibility);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
minimized = false;
|
||||
};
|
||||
|
||||
this._win.on('minimize', () => minimized = true);
|
||||
this._win.on('restore', () => restoreSmoothScrolling());
|
||||
this._win.on('maximize', () => restoreSmoothScrolling());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private onUntitledWorkspaceDeleted(workspace: IWorkspaceIdentifier): void {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IProcessEnvironment, isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||
import { IProcessEnvironment, isMacintosh } from 'vs/base/common/platform';
|
||||
import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { IRecentlyOpened } from 'vs/platform/history/common/history';
|
||||
|
@ -247,7 +247,6 @@ export interface IWindowSettings {
|
|||
nativeFullScreen: boolean;
|
||||
enableMenuBarMnemonics: boolean;
|
||||
closeWhenEmpty: boolean;
|
||||
smoothScrollingWorkaround: boolean;
|
||||
clickThroughInactive: boolean;
|
||||
}
|
||||
|
||||
|
@ -270,11 +269,6 @@ export function getTitleBarStyle(configurationService: IConfigurationService, en
|
|||
return 'native'; // simple fullscreen does not work well with custom title style (https://github.com/Microsoft/vscode/issues/63291)
|
||||
}
|
||||
|
||||
const smoothScrollingWorkaround = isWindows && configuration.smoothScrollingWorkaround === true;
|
||||
if (smoothScrollingWorkaround) {
|
||||
return 'native'; // smooth scrolling workaround does not work with custom title style
|
||||
}
|
||||
|
||||
const style = configuration.titleBarStyle;
|
||||
if (style === 'native') {
|
||||
return 'native';
|
||||
|
|
|
@ -620,13 +620,6 @@ configurationRegistry.registerConfiguration({
|
|||
'description': nls.localize('window.nativeFullScreen', "Controls if native full-screen should be used on macOS. Disable this option to prevent macOS from creating a new space when going full-screen."),
|
||||
'included': isMacintosh
|
||||
},
|
||||
'window.smoothScrollingWorkaround': { // TODO@Ben remove once https://github.com/Microsoft/vscode/issues/61824 settles
|
||||
'type': 'boolean',
|
||||
'default': false,
|
||||
'scope': ConfigurationScope.APPLICATION,
|
||||
'markdownDescription': nls.localize('window.smoothScrollingWorkaround', "Enable this workaround if scrolling is no longer smooth after restoring a minimized VS Code window. This is a workaround for an issue (https://github.com/Microsoft/vscode/issues/13612) where scrolling starts to lag on devices with precision trackpads like the Surface devices from Microsoft. Enabling this workaround can result in a little bit of layout flickering after restoring the window from minimized state but is otherwise harmless."),
|
||||
'included': isWindows
|
||||
},
|
||||
'window.clickThroughInactive': {
|
||||
'type': 'boolean',
|
||||
'default': true,
|
||||
|
|
|
@ -15,7 +15,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
|
|||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { isEqual } from 'vs/base/common/resources';
|
||||
import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||
import { isLinux, isMacintosh } from 'vs/base/common/platform';
|
||||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { equals } from 'vs/base/common/objects';
|
||||
|
@ -38,7 +38,6 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
|
|||
private enableCrashReporter: boolean;
|
||||
private touchbarEnabled: boolean;
|
||||
private treeHorizontalScrolling: boolean;
|
||||
private windowsSmoothScrollingWorkaround: boolean;
|
||||
private experimentalFileWatcher: boolean;
|
||||
private fileWatcherExclude: object;
|
||||
private useGridLayout: boolean;
|
||||
|
@ -139,12 +138,6 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
|
|||
changed = true;
|
||||
}
|
||||
|
||||
// Windows: smooth scrolling workaround
|
||||
if (isWindows && config.window && typeof config.window.smoothScrollingWorkaround === 'boolean' && config.window.smoothScrollingWorkaround !== this.windowsSmoothScrollingWorkaround) {
|
||||
this.windowsSmoothScrollingWorkaround = config.window.smoothScrollingWorkaround;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// Workbench Grid Layout
|
||||
if (config.workbench && typeof config.workbench.useExperimentalGridLayout === 'boolean' && config.workbench.useExperimentalGridLayout !== this.useGridLayout) {
|
||||
this.useGridLayout = config.workbench.useExperimentalGridLayout;
|
||||
|
|
Loading…
Reference in a new issue