File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -909,14 +909,18 @@ else {
909909 window . webContents . on ( 'will-navigate' , ( event , url ) => {
910910 if ( new URL ( url ) . origin !== backend . origin ) event . preventDefault ( ) ;
911911 } ) ;
912- window . once ( 'ready-to-show' , ( ) => {
912+ const showLoadedWindow = ( ) => {
913913 hideNativeMenuBar ( window ) ;
914- if ( ! backgroundRenderSmoke ) {
914+ if ( ! backgroundRenderSmoke && ! window . isVisible ( ) ) {
915915 if ( process . argv . includes ( '--background' ) ) window . showInactive ( ) ;
916916 else window . show ( ) ;
917917 }
918918 updatePerformanceSampling ( window ) ;
919- } ) ;
919+ } ;
920+ window . once ( 'ready-to-show' , showLoadedWindow ) ;
921+ // Windows may finish loading the renderer without painting a hidden window.
922+ // Show the actual application after load as well, preserving background tests.
923+ if ( process . platform === 'win32' ) window . webContents . once ( 'did-finish-load' , showLoadedWindow ) ;
920924 window . on ( 'focus' , ( ) => {
921925 updateAppearance ( ) ;
922926 rebuildMenu ( ) ;
You can’t perform that action at this time.
0 commit comments