SEBWIN-716, #323: Fixed issue where password dialog was visible but not having input focus during application startup.
This commit is contained in:
parent
27f2fde904
commit
0769cf6b4b
7 changed files with 27 additions and 16 deletions
|
@ -17,7 +17,7 @@ namespace SafeExamBrowser.Runtime
|
|||
public class App : Application
|
||||
{
|
||||
private static readonly Mutex Mutex = new Mutex(true, AppConfig.RUNTIME_MUTEX_NAME);
|
||||
private CompositionRoot instances = new CompositionRoot();
|
||||
private readonly CompositionRoot instances = new CompositionRoot();
|
||||
|
||||
[STAThread]
|
||||
public static void Main()
|
||||
|
|
|
@ -31,19 +31,19 @@ namespace SafeExamBrowser.Runtime
|
|||
{
|
||||
internal class RuntimeController
|
||||
{
|
||||
private AppConfig appConfig;
|
||||
private ILogger logger;
|
||||
private IMessageBox messageBox;
|
||||
private IOperationSequence bootstrapSequence;
|
||||
private IRepeatableOperationSequence sessionSequence;
|
||||
private IRuntimeHost runtimeHost;
|
||||
private IRuntimeWindow runtimeWindow;
|
||||
private IServiceProxy service;
|
||||
private SessionContext sessionContext;
|
||||
private ISplashScreen splashScreen;
|
||||
private Action shutdown;
|
||||
private IText text;
|
||||
private IUserInterfaceFactory uiFactory;
|
||||
private readonly AppConfig appConfig;
|
||||
private readonly ILogger logger;
|
||||
private readonly IMessageBox messageBox;
|
||||
private readonly IOperationSequence bootstrapSequence;
|
||||
private readonly IRepeatableOperationSequence sessionSequence;
|
||||
private readonly IRuntimeHost runtimeHost;
|
||||
private readonly IRuntimeWindow runtimeWindow;
|
||||
private readonly IServiceProxy service;
|
||||
private readonly SessionContext sessionContext;
|
||||
private readonly ISplashScreen splashScreen;
|
||||
private readonly Action shutdown;
|
||||
private readonly IText text;
|
||||
private readonly IUserInterfaceFactory uiFactory;
|
||||
|
||||
private SessionConfiguration Session
|
||||
{
|
||||
|
@ -95,6 +95,13 @@ namespace SafeExamBrowser.Runtime
|
|||
sessionSequence.ProgressChanged += SessionSequence_ProgressChanged;
|
||||
sessionSequence.StatusChanged += SessionSequence_StatusChanged;
|
||||
|
||||
// We need to show the runtime window here already, this way implicitly setting it as the runtime application's main window.
|
||||
// Otherwise, the splash screen is considered as the main window and thus the operating system and/or WPF does not correctly
|
||||
// activate the runtime window once bootstrapping has finished, which in turn leads to undesired UI behavior.
|
||||
runtimeWindow.Show();
|
||||
runtimeWindow.BringToForeground();
|
||||
runtimeWindow.SetIndeterminate();
|
||||
|
||||
splashScreen.Show();
|
||||
splashScreen.BringToForeground();
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace SafeExamBrowser.UserInterface.Contracts
|
|||
void SetIndeterminate();
|
||||
|
||||
/// <summary>
|
||||
/// Sets the maximum progress value.
|
||||
/// Sets the maximum progress value. Resets the style of the progress indicator to determinate in case it has been set to indeterminate.
|
||||
/// </summary>
|
||||
void SetMaxValue(int max);
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
|
|||
|
||||
public void SetMaxValue(int max)
|
||||
{
|
||||
model.IsIndeterminate = false;
|
||||
model.MaxProgress = max;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
|
|||
{
|
||||
private readonly ProgressIndicatorViewModel model;
|
||||
private readonly IText text;
|
||||
|
||||
|
||||
private AppConfig appConfig;
|
||||
private bool allowClose;
|
||||
|
||||
|
@ -106,6 +106,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
|
|||
|
||||
public void SetMaxValue(int max)
|
||||
{
|
||||
model.IsIndeterminate = false;
|
||||
model.MaxProgress = max;
|
||||
}
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
|
|||
|
||||
public void SetMaxValue(int max)
|
||||
{
|
||||
model.IsIndeterminate = false;
|
||||
model.MaxProgress = max;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
|
|||
|
||||
public void SetMaxValue(int max)
|
||||
{
|
||||
model.IsIndeterminate = false;
|
||||
model.MaxProgress = max;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue