@@ -15,7 +15,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
1515import { RunOnceScheduler } from 'vs/base/common/async' ;
1616import { URI } from 'vs/base/common/uri' ;
1717import { isEqual } from 'vs/base/common/resources' ;
18- import { isMacintosh } from 'vs/base/common/platform' ;
18+ import { isMacintosh , isNative } from 'vs/base/common/platform' ;
1919import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle' ;
2020import { IDialogService } from 'vs/platform/dialogs/common/dialogs' ;
2121import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService' ;
@@ -57,48 +57,6 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
5757 private onConfigurationChange ( config : IConfiguration , notify : boolean ) : void {
5858 let changed = false ;
5959
60- // Titlebar style
61- if ( config . window && config . window . titleBarStyle !== this . titleBarStyle && ( config . window . titleBarStyle === 'native' || config . window . titleBarStyle === 'custom' ) ) {
62- this . titleBarStyle = config . window . titleBarStyle ;
63- changed = true ;
64- }
65-
66- // macOS: Native tabs
67- if ( isMacintosh && config . window && typeof config . window . nativeTabs === 'boolean' && config . window . nativeTabs !== this . nativeTabs ) {
68- this . nativeTabs = config . window . nativeTabs ;
69- changed = true ;
70- }
71-
72- // macOS: Native fullscreen
73- if ( isMacintosh && config . window && typeof config . window . nativeFullScreen === 'boolean' && config . window . nativeFullScreen !== this . nativeFullScreen ) {
74- this . nativeFullScreen = config . window . nativeFullScreen ;
75- changed = true ;
76- }
77-
78- // macOS: Click through (accept first mouse)
79- if ( isMacintosh && config . window && typeof config . window . clickThroughInactive === 'boolean' && config . window . clickThroughInactive !== this . clickThroughInactive ) {
80- this . clickThroughInactive = config . window . clickThroughInactive ;
81- changed = true ;
82- }
83-
84- // Update channel
85- if ( config . update && typeof config . update . mode === 'string' && config . update . mode !== this . updateMode ) {
86- this . updateMode = config . update . mode ;
87- changed = true ;
88- }
89-
90- // Crash reporter
91- if ( config . telemetry && typeof config . telemetry . enableCrashReporter === 'boolean' && config . telemetry . enableCrashReporter !== this . enableCrashReporter ) {
92- this . enableCrashReporter = config . telemetry . enableCrashReporter ;
93- changed = true ;
94- }
95-
96- // macOS: Touchbar config
97- if ( isMacintosh && config . keyboard && config . keyboard . touchbar && typeof config . keyboard . touchbar . enabled === 'boolean' && config . keyboard . touchbar . enabled !== this . touchbarEnabled ) {
98- this . touchbarEnabled = config . keyboard . touchbar . enabled ;
99- changed = true ;
100- }
101-
10260 // Tree horizontal scrolling support
10361 if ( config . workbench && config . workbench . list && typeof config . workbench . list . horizontalScrolling === 'boolean' && config . workbench . list . horizontalScrolling !== this . treeHorizontalScrolling ) {
10462 this . treeHorizontalScrolling = config . workbench . list . horizontalScrolling ;
@@ -117,12 +75,63 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
11775 changed = true ;
11876 }
11977
78+ if ( isNative ) {
79+
80+ // Titlebar style
81+ if ( config . window && config . window . titleBarStyle !== this . titleBarStyle && ( config . window . titleBarStyle === 'native' || config . window . titleBarStyle === 'custom' ) ) {
82+ this . titleBarStyle = config . window . titleBarStyle ;
83+ changed = true ;
84+ }
85+
86+ // macOS: Native tabs
87+ if ( isMacintosh && config . window && typeof config . window . nativeTabs === 'boolean' && config . window . nativeTabs !== this . nativeTabs ) {
88+ this . nativeTabs = config . window . nativeTabs ;
89+ changed = true ;
90+ }
91+
92+ // macOS: Native fullscreen
93+ if ( isMacintosh && config . window && typeof config . window . nativeFullScreen === 'boolean' && config . window . nativeFullScreen !== this . nativeFullScreen ) {
94+ this . nativeFullScreen = config . window . nativeFullScreen ;
95+ changed = true ;
96+ }
97+
98+ // macOS: Click through (accept first mouse)
99+ if ( isMacintosh && config . window && typeof config . window . clickThroughInactive === 'boolean' && config . window . clickThroughInactive !== this . clickThroughInactive ) {
100+ this . clickThroughInactive = config . window . clickThroughInactive ;
101+ changed = true ;
102+ }
103+
104+ // Update channel
105+ if ( config . update && typeof config . update . mode === 'string' && config . update . mode !== this . updateMode ) {
106+ this . updateMode = config . update . mode ;
107+ changed = true ;
108+ }
109+
110+ // Crash reporter
111+ if ( config . telemetry && typeof config . telemetry . enableCrashReporter === 'boolean' && config . telemetry . enableCrashReporter !== this . enableCrashReporter ) {
112+ this . enableCrashReporter = config . telemetry . enableCrashReporter ;
113+ changed = true ;
114+ }
115+
116+ // macOS: Touchbar config
117+ if ( isMacintosh && config . keyboard && config . keyboard . touchbar && typeof config . keyboard . touchbar . enabled === 'boolean' && config . keyboard . touchbar . enabled !== this . touchbarEnabled ) {
118+ this . touchbarEnabled = config . keyboard . touchbar . enabled ;
119+ changed = true ;
120+ }
121+ }
122+
120123 // Notify only when changed and we are the focused window (avoids notification spam across windows)
121124 if ( notify && changed ) {
122125 this . doConfirm (
123- localize ( 'relaunchSettingMessage' , "A setting has changed that requires a restart to take effect." ) ,
124- localize ( 'relaunchSettingDetail' , "Press the restart button to restart {0} and enable the setting." , this . envService . appNameLong ) ,
125- localize ( 'restart' , "&&Restart" ) ,
126+ isNative ?
127+ localize ( 'relaunchSettingMessage' , "A setting has changed that requires a restart to take effect." ) :
128+ localize ( 'relaunchSettingMessageWeb' , "A setting has changed that requires a reload to take effect." ) ,
129+ isNative ?
130+ localize ( 'relaunchSettingDetail' , "Press the restart button to restart {0} and enable the setting." , this . envService . appNameLong ) :
131+ localize ( 'relaunchSettingDetailWeb' , "Press the reload button to reload {0} and enable the setting." , this . envService . appNameLong ) ,
132+ isNative ?
133+ localize ( 'restart' , "&&Restart" ) :
134+ localize ( 'restartWeb' , "&&Reload" ) ,
126135 ( ) => this . windowsService . relaunch ( Object . create ( null ) )
127136 ) ;
128137 }
0 commit comments