mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
workaround for #75830
This commit is contained in:
@@ -156,7 +156,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
}
|
||||
}
|
||||
|
||||
if (isMacintosh && windowConfig && windowConfig.nativeTabs === true) {
|
||||
const useNativeTabs = isMacintosh && windowConfig && windowConfig.nativeTabs === true;
|
||||
if (useNativeTabs) {
|
||||
options.tabbingIdentifier = product.nameShort; // this opts in to sierra tabs
|
||||
}
|
||||
|
||||
@@ -180,7 +181,10 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
// TODO@Ben (Electron 4 regression): when running on multiple displays where the target display
|
||||
// to open the window has a larger resolution than the primary display, the window will not size
|
||||
// correctly unless we set the bounds again (https://github.com/microsoft/vscode/issues/74872)
|
||||
if (isMacintosh && hasMultipleDisplays) {
|
||||
// However, when running with native tabs we cannot use this workaround because there is a potential
|
||||
// that the new window will be added as native tab instead of being a window on its own. In that
|
||||
// case calling setBounds() would cause https://github.com/microsoft/vscode/issues/75830
|
||||
if (isMacintosh && hasMultipleDisplays && !useNativeTabs) {
|
||||
if ([this.windowState.width, this.windowState.height, this.windowState.x, this.windowState.y].every(value => typeof value === 'number')) {
|
||||
this._win.setBounds({
|
||||
width: this.windowState.width!,
|
||||
|
||||
Reference in New Issue
Block a user