@@ -61,21 +61,25 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
61
61
private onConfigurationChange ( config : IConfiguration , notify : boolean ) : void {
62
62
let changed = false ;
63
63
64
+ function processChanged ( didChange : boolean ) {
65
+ changed = changed || didChange ;
66
+ }
67
+
64
68
if ( isNative ) {
65
69
// 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 ) ) ;
67
71
// 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 ) ) ;
69
73
// Windows: Sandbox
70
- changed = changed || this . windowSandboxEnabled . handleChange ( config . window ?. experimental ?. useSandbox ) ;
74
+ processChanged ( this . windowSandboxEnabled . handleChange ( config . window ?. experimental ?. useSandbox ) ) ;
71
75
// macOS: Native tabs
72
- changed = changed || isMacintosh && this . nativeTabs . handleChange ( config . window ?. nativeTabs ) ;
76
+ processChanged ( isMacintosh && this . nativeTabs . handleChange ( config . window ?. nativeTabs ) ) ;
73
77
// macOS: Native fullscreen
74
- changed = changed || isMacintosh && this . nativeFullScreen . handleChange ( config . window ?. nativeFullScreen ) ;
78
+ processChanged ( isMacintosh && this . nativeFullScreen . handleChange ( config . window ?. nativeFullScreen ) ) ;
75
79
// 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 ) ) ;
77
81
// Update channel
78
- changed = changed || this . updateMode . handleChange ( config . update ?. mode ) ;
82
+ processChanged ( this . updateMode . handleChange ( config . update ?. mode ) ) ;
79
83
80
84
// On linux turning on accessibility support will also pass this flag to the chrome renderer, thus a restart is required
81
85
if ( isLinux && typeof config . editor ?. accessibilitySupport === 'string' && config . editor . accessibilitySupport !== this . accessibilitySupport ) {
@@ -86,15 +90,15 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
86
90
}
87
91
88
92
// Workspace trust
89
- changed = changed || this . workspaceTrustEnabled . handleChange ( config ?. security ?. workspace ?. trust ?. enabled ) ;
93
+ processChanged ( this . workspaceTrustEnabled . handleChange ( config ?. security ?. workspace ?. trust ?. enabled ) ) ;
90
94
91
95
}
92
96
// 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 ) ) ;
94
98
// Experiments
95
- changed = changed || this . experimentsEnabled . handleChange ( config . workbench ?. enableExperiments ) ;
99
+ processChanged ( this . experimentsEnabled . handleChange ( config . workbench ?. enableExperiments ) ) ;
96
100
// 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 ) ) ;
98
102
99
103
// Notify only when changed and we are the focused window (avoids notification spam across windows)
100
104
if ( notify && changed ) {
0 commit comments