File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/vs/platform/windows/electron-main Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,15 @@ export class CodeWindow extends Disposable implements ICodeWindow {
307
307
this . setFullScreen ( true ) ;
308
308
}
309
309
310
- if ( ! this . _win . isVisible ( ) ) {
310
+ if (
311
+ ! this . _win . isVisible ( ) ||
312
+ // TODO@electron : Required condition ever since https://github.com/electron/electron/pull/33536
313
+ // landed in Electron 17.4.2: calling `window.maximize()` on macOS will wrongly result in
314
+ // `window.isVisible()` to return `true` even though a different window might still be on top.
315
+ // As such, we also need to ask for `window.isFocused()` which on macOS will ask whether the
316
+ // window is a "key" window.
317
+ ( isMacintosh && ! this . _win . isFocused ( ) )
318
+ ) {
311
319
this . _win . show ( ) ; // to reduce flicker from the default window size to maximize, we only show after maximize
312
320
}
313
321
mark ( 'code/didMaximizeCodeWindow' ) ;
@@ -792,7 +800,6 @@ export class CodeWindow extends Disposable implements ICodeWindow {
792
800
this . focus ( { force : true } ) ;
793
801
this . _win . webContents . openDevTools ( ) ;
794
802
}
795
-
796
803
} , 10000 ) ) . schedule ( ) ;
797
804
}
798
805
You can’t perform that action at this time.
0 commit comments