SEBWIN-611: Attempt to correctly resize lockscreen on display resolution change.

This commit is contained in:
Damian Büchel 2023-02-16 17:54:40 +01:00
parent baad469be6
commit 2aaa74c7b0
4 changed files with 27 additions and 0 deletions

View file

@ -625,9 +625,12 @@ namespace SafeExamBrowser.Client
{
logger.Info("Re-initializing working area...");
displayMonitor.InitializePrimaryDisplay(Settings.Taskbar.EnableTaskbar ? taskbar.GetAbsoluteHeight() : 0);
logger.Info("Re-initializing shell...");
actionCenter.InitializeBounds();
lockScreen?.InitializeBounds();
taskbar.InitializeBounds();
logger.Info("Desktop successfully restored.");
if (!displayMonitor.ValidateConfiguration(Settings.Display).IsAllowed)

View file

@ -20,6 +20,11 @@ namespace SafeExamBrowser.UserInterface.Contracts.Windows
/// </summary>
void Cancel();
/// <summary>
/// Expands the lock screen across all active displays and resizes it accordingly.
/// </summary>
void InitializeBounds();
/// <summary>
/// Waits for the user to provide the required input to unlock the application.
/// </summary>

View file

@ -68,6 +68,20 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
Dispatcher.Invoke(CloseAll);
}
public void InitializeBounds()
{
foreach (var window in windows)
{
window.Topmost = true;
window.WindowState = WindowState.Maximized;
window.Activate();
}
Topmost = true;
WindowState = WindowState.Maximized;
Activate();
}
public new void Show()
{
Dispatcher.Invoke(ShowAll);

View file

@ -68,6 +68,11 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
Dispatcher.Invoke(CloseAll);
}
public void InitializeBounds()
{
// TODO
}
public new void Show()
{
Dispatcher.Invoke(ShowAll);