@@ -163,6 +163,10 @@ protected GameTestBase()
163163
164164 // by default we want the same size for the back buffer on mobiles and windows.
165165 BackBufferSizeMode = BackBufferSizeMode . FitToDesiredValues ;
166+
167+ // Only make window visible in interactive mode,
168+ // otherwise it's quite disrupting for user: new window might display on top and steal focus
169+ MakeWindowVisibleOnRun = ForceInteractiveMode ;
166170 }
167171
168172 /// <inheritdoc />
@@ -189,7 +193,6 @@ protected override void Initialize()
189193 SceneSystem . SplashScreenEnabled = false ;
190194 }
191195
192-
193196 /// <summary>
194197 /// Saves a Texture locally or on the test server.
195198 /// </summary>
@@ -366,6 +369,16 @@ private void FitPresentationParametersToWindowRatio(int windowWidth, int windowH
366369 }
367370#endif
368371
372+ protected override void OnWindowCreated ( )
373+ {
374+ base . OnWindowCreated ( ) ;
375+
376+ // Disabled for SDL as a position of (0,0) actually means that the client area of the
377+ // window will be at (0,0) not the top left corner of the non-client area of the window.
378+ if ( Context . ContextType != AppContextType . DesktopSDL )
379+ Window . Position = Int2 . Zero ; // avoid possible side effects due to position of the window in the screen.
380+ }
381+
369382 /// <inheritdoc/>
370383 protected override async Task LoadContent ( )
371384 {
@@ -388,12 +401,6 @@ protected override async Task LoadContent()
388401 if ( ! ForceInteractiveMode )
389402 InitializeSimulatedInputSource ( ) ;
390403
391- #if ! STRIDE_UI_SDL
392- // Disabled for SDL as a position of (0,0) actually means that the client area of the
393- // window will be at (0,0) not the top left corner of the non-client area of the window.
394- Window . Position = Int2 . Zero ; // avoid possible side effects due to position of the window in the screen.
395- #endif
396-
397404 Script . AddTask ( RegisterTestsInternal ) ;
398405
399406 //
0 commit comments