Skip to content

Commit 42580d6

Browse files
committed
Bugfix
1 parent 06a874d commit 42580d6

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,25 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
6161
private onConfigurationChange(config: IConfiguration, notify: boolean): void {
6262
let changed = false;
6363

64+
function processChanged(didChange: boolean) {
65+
changed = changed || didChange;
66+
}
67+
6468
if (isNative) {
6569
// Titlebar style
66-
changed = changed || (config.window.titleBarStyle === 'native' || config.window.titleBarStyle === 'custom') && this.titleBarStyle.handleChange(config.window?.titleBarStyle);
70+
processChanged((config.window.titleBarStyle === 'native' || config.window.titleBarStyle === 'custom') && this.titleBarStyle.handleChange(config.window?.titleBarStyle));
6771
// Windows: Window Controls Overlay
68-
changed = changed || isWindows && this.windowControlsOverlayEnabled.handleChange(config.window?.experimental?.windowControlsOverlay?.enabled);
72+
processChanged(isWindows && this.windowControlsOverlayEnabled.handleChange(config.window?.experimental?.windowControlsOverlay?.enabled));
6973
// Windows: Sandbox
70-
changed = changed || this.windowSandboxEnabled.handleChange(config.window?.experimental?.useSandbox);
74+
processChanged(this.windowSandboxEnabled.handleChange(config.window?.experimental?.useSandbox));
7175
// macOS: Native tabs
72-
changed = changed || isMacintosh && this.nativeTabs.handleChange(config.window?.nativeTabs);
76+
processChanged(isMacintosh && this.nativeTabs.handleChange(config.window?.nativeTabs));
7377
// macOS: Native fullscreen
74-
changed = changed || isMacintosh && this.nativeFullScreen.handleChange(config.window?.nativeFullScreen);
78+
processChanged(isMacintosh && this.nativeFullScreen.handleChange(config.window?.nativeFullScreen));
7579
// macOS: Click through (accept first mouse)
76-
changed = changed || isMacintosh && this.clickThroughInactive.handleChange(config.window?.clickThroughInactive);
80+
processChanged(isMacintosh && this.clickThroughInactive.handleChange(config.window?.clickThroughInactive));
7781
// Update channel
78-
changed = changed || this.updateMode.handleChange(config.update?.mode);
82+
processChanged(this.updateMode.handleChange(config.update?.mode));
7983

8084
// On linux turning on accessibility support will also pass this flag to the chrome renderer, thus a restart is required
8185
if (isLinux && typeof config.editor?.accessibilitySupport === 'string' && config.editor.accessibilitySupport !== this.accessibilitySupport) {
@@ -86,15 +90,15 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
8690
}
8791

8892
// Workspace trust
89-
changed = changed || this.workspaceTrustEnabled.handleChange(config?.security?.workspace?.trust?.enabled);
93+
processChanged(this.workspaceTrustEnabled.handleChange(config?.security?.workspace?.trust?.enabled));
9094

9195
}
9296
// Profiles
93-
changed = changed || this.productService.quality === 'stable' && this.settingsProfilesEnabled.handleChange(config.workbench?.experimental?.settingsProfiles?.enabled);
97+
processChanged(this.productService.quality === 'stable' && this.settingsProfilesEnabled.handleChange(config.workbench?.experimental?.settingsProfiles?.enabled));
9498
// Experiments
95-
changed = changed || this.experimentsEnabled.handleChange(config.workbench?.enableExperiments);
99+
processChanged(this.experimentsEnabled.handleChange(config.workbench?.enableExperiments));
96100
// Profiles
97-
changed = changed || this.productService.quality !== 'stable' && this.enablePPEExtensionsGallery.handleChange(config._extensionsGallery?.enablePPE);
101+
processChanged(this.productService.quality !== 'stable' && this.enablePPEExtensionsGallery.handleChange(config._extensionsGallery?.enablePPE));
98102

99103
// Notify only when changed and we are the focused window (avoids notification spam across windows)
100104
if (notify && changed) {

0 commit comments

Comments
 (0)