Skip to content

Commit b9438bb

Browse files
author
Benjamin Pasero
committed
1 parent 2e5e001 commit b9438bb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/vs/platform/windows/electron-main/windowsMainService.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,15 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic
13811381
// Window state is from a previous session: only allow fullscreen when we got updated or user wants to restore
13821382
else {
13831383
allowFullscreen = this.lifecycleMainService.wasRestarted || (windowConfig && windowConfig.restoreFullscreen);
1384+
1385+
if (allowFullscreen && isMacintosh && WindowsMainService.WINDOWS.some(win => win.isFullScreen)) {
1386+
// macOS: Electron does not allow to restore multiple windows in
1387+
// fullscreen. As such, if we already restored a window in that
1388+
// state, we cannot allow more fullscreen windows. See
1389+
// https://github.com/microsoft/vscode/issues/41691 and
1390+
// https://github.com/electron/electron/issues/13077
1391+
allowFullscreen = false;
1392+
}
13841393
}
13851394

13861395
if (state.mode === WindowMode.Fullscreen && !allowFullscreen) {

0 commit comments

Comments
 (0)