Skip to content

Commit

Permalink
Enable simple fullscreen again (fix #75054)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Aug 5, 2019
1 parent bb8bf06 commit b082da1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
17 changes: 8 additions & 9 deletions src/vs/code/electron-main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,17 +838,16 @@ export class CodeWindow extends Disposable implements ICodeWindow {
}

private useNativeFullScreen(): boolean {
return true; // TODO@ben enable simple fullscreen again (https://github.com/microsoft/vscode/issues/75054)
// const windowConfig = this.configurationService.getValue<IWindowSettings>('window');
// if (!windowConfig || typeof windowConfig.nativeFullScreen !== 'boolean') {
// return true; // default
// }
const windowConfig = this.configurationService.getValue<IWindowSettings>('window');
if (!windowConfig || typeof windowConfig.nativeFullScreen !== 'boolean') {
return true; // default
}

// if (windowConfig.nativeTabs) {
// return true; // https://github.com/electron/electron/issues/16142
// }
if (windowConfig.nativeTabs) {
return true; // https://github.com/electron/electron/issues/16142
}

// return windowConfig.nativeFullScreen !== false;
return windowConfig.nativeFullScreen !== false;
}

isMinimized(): boolean {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/windows/common/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export function getTitleBarStyle(configurationService: IConfigurationService, en
return 'native'; // native tabs on sierra do not work with custom title style
}

const useSimpleFullScreen = false; //isMacintosh && configuration.nativeFullScreen === false;
const useSimpleFullScreen = isMacintosh && configuration.nativeFullScreen === false;
if (useSimpleFullScreen) {
return 'native'; // simple fullscreen does not work well with custom title style (https://github.com/Microsoft/vscode/issues/63291)
}
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/electron-browser/main.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ import product from 'vs/platform/product/node/product';
'default': true,
'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."),
'scope': ConfigurationScope.APPLICATION,
'included': false /* isMacintosh */
'included': isMacintosh
},
'window.clickThroughInactive': {
'type': 'boolean',
Expand All @@ -533,4 +533,4 @@ import product from 'vs/platform/product/node/product';
}
}
});
})();
})();

0 comments on commit b082da1

Please sign in to comment.