From f57771fda9315f46af250d9e1df1285b2d35f176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Thu, 16 Feb 2023 22:18:47 +0100 Subject: [PATCH] SEBWIN-611: Forgot to invoke lockscreen re-initialization on dispatcher. --- .../Windows/LockScreen.xaml.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/LockScreen.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/LockScreen.xaml.cs index e1eb6808..c2ec5496 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/LockScreen.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/LockScreen.xaml.cs @@ -70,16 +70,19 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows public void InitializeBounds() { - foreach (var window in windows) + Dispatcher.Invoke(() => { - window.Topmost = true; - window.WindowState = WindowState.Maximized; - window.Activate(); - } + foreach (var window in windows) + { + window.Topmost = true; + window.WindowState = WindowState.Maximized; + window.Activate(); + } - Topmost = true; - WindowState = WindowState.Maximized; - Activate(); + Topmost = true; + WindowState = WindowState.Maximized; + Activate(); + }); } public new void Show()