@@ -31,19 +31,19 @@ namespace SafeExamBrowser.Runtime
31
31
{
32
32
internal class RuntimeController
33
33
{
34
- private AppConfig appConfig ;
35
- private ILogger logger ;
36
- private IMessageBox messageBox ;
37
- private IOperationSequence bootstrapSequence ;
38
- private IRepeatableOperationSequence sessionSequence ;
39
- private IRuntimeHost runtimeHost ;
40
- private IRuntimeWindow runtimeWindow ;
41
- private IServiceProxy service ;
42
- private SessionContext sessionContext ;
43
- private ISplashScreen splashScreen ;
44
- private Action shutdown ;
45
- private IText text ;
46
- private IUserInterfaceFactory uiFactory ;
34
+ private readonly AppConfig appConfig ;
35
+ private readonly ILogger logger ;
36
+ private readonly IMessageBox messageBox ;
37
+ private readonly IOperationSequence bootstrapSequence ;
38
+ private readonly IRepeatableOperationSequence sessionSequence ;
39
+ private readonly IRuntimeHost runtimeHost ;
40
+ private readonly IRuntimeWindow runtimeWindow ;
41
+ private readonly IServiceProxy service ;
42
+ private readonly SessionContext sessionContext ;
43
+ private readonly ISplashScreen splashScreen ;
44
+ private readonly Action shutdown ;
45
+ private readonly IText text ;
46
+ private readonly IUserInterfaceFactory uiFactory ;
47
47
48
48
private SessionConfiguration Session
49
49
{
@@ -95,6 +95,13 @@ internal bool TryStart()
95
95
sessionSequence . ProgressChanged += SessionSequence_ProgressChanged ;
96
96
sessionSequence . StatusChanged += SessionSequence_StatusChanged ;
97
97
98
+ // We need to show the runtime window here already, this way implicitly setting it as the runtime application's main window.
99
+ // Otherwise, the splash screen is considered as the main window and thus the operating system and/or WPF does not correctly
100
+ // activate the runtime window once bootstrapping has finished, which in turn leads to undesired UI behavior.
101
+ runtimeWindow . Show ( ) ;
102
+ runtimeWindow . BringToForeground ( ) ;
103
+ runtimeWindow . SetIndeterminate ( ) ;
104
+
98
105
splashScreen . Show ( ) ;
99
106
splashScreen . BringToForeground ( ) ;
100
107
0 commit comments