in src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts [57:129]
private onConfigurationChange(config: IConfiguration, notify: boolean): void {
let changed = false;
// Titlebar style
if (config.window && config.window.titleBarStyle !== this.titleBarStyle && (config.window.titleBarStyle === 'native' || config.window.titleBarStyle === 'custom')) {
this.titleBarStyle = config.window.titleBarStyle;
changed = true;
}
// macOS: Native tabs
if (isMacintosh && config.window && typeof config.window.nativeTabs === 'boolean' && config.window.nativeTabs !== this.nativeTabs) {
this.nativeTabs = config.window.nativeTabs;
changed = true;
}
// macOS: Native fullscreen
if (isMacintosh && config.window && typeof config.window.nativeFullScreen === 'boolean' && config.window.nativeFullScreen !== this.nativeFullScreen) {
this.nativeFullScreen = config.window.nativeFullScreen;
changed = true;
}
// macOS: Click through (accept first mouse)
if (isMacintosh && config.window && typeof config.window.clickThroughInactive === 'boolean' && config.window.clickThroughInactive !== this.clickThroughInactive) {
this.clickThroughInactive = config.window.clickThroughInactive;
changed = true;
}
// Update channel
if (config.update && typeof config.update.mode === 'string' && config.update.mode !== this.updateMode) {
this.updateMode = config.update.mode;
changed = true;
}
// Crash reporter
if (config.telemetry && typeof config.telemetry.enableCrashReporter === 'boolean' && config.telemetry.enableCrashReporter !== this.enableCrashReporter) {
this.enableCrashReporter = config.telemetry.enableCrashReporter;
changed = true;
}
// macOS: Touchbar config
if (isMacintosh && config.keyboard && config.keyboard.touchbar && typeof config.keyboard.touchbar.enabled === 'boolean' && config.keyboard.touchbar.enabled !== this.touchbarEnabled) {
this.touchbarEnabled = config.keyboard.touchbar.enabled;
changed = true;
}
// Tree horizontal scrolling support
if (config.workbench && config.workbench.list && typeof config.workbench.list.horizontalScrolling === 'boolean' && config.workbench.list.horizontalScrolling !== this.treeHorizontalScrolling) {
this.treeHorizontalScrolling = config.workbench.list.horizontalScrolling;
changed = true;
}
// Workbench Grid Layout
if (config.workbench && typeof config.workbench.useExperimentalGridLayout === 'boolean' && config.workbench.useExperimentalGridLayout !== this.useGridLayout) {
this.useGridLayout = config.workbench.useExperimentalGridLayout;
changed = true;
}
// Debug console word wrap
if (config.debug && typeof config.debug.console.wordWrap === 'boolean' && config.debug.console.wordWrap !== this.debugConsoleWordWrap) {
this.debugConsoleWordWrap = config.debug.console.wordWrap;
changed = true;
}
// Notify only when changed and we are the focused window (avoids notification spam across windows)
if (notify && changed) {
this.doConfirm(
localize('relaunchSettingMessage', "A setting has changed that requires a restart to take effect."),
localize('relaunchSettingDetail', "Press the restart button to restart {0} and enable the setting.", this.envService.appNameLong),
localize('restart', "&&Restart"),
() => this.windowsService.relaunch(Object.create(null))
);
}
}