SEBWIN-477: Ensured multiple lock screen instructions sent by the server don't cause multiple lock screens.

This commit is contained in:
Damian Büchel 2022-09-02 15:00:51 +02:00
parent 3a39784af2
commit 22e4e3fa7b

View file

@ -654,9 +654,18 @@ namespace SafeExamBrowser.Client
private void Server_LockScreenRequested(string message)
{
logger.Info("Received lock screen event from SEB Server.");
var title = text.Get(TextKey.LockScreen_Title);
ShowLockScreen(message, title, Enumerable.Empty<LockScreenOption>());
logger.Info("Attempting to show lock screen as requested by the server...");
if (!sessionLocked)
{
sessionLocked = true;
ShowLockScreen(message, text.Get(TextKey.LockScreen_Title), Enumerable.Empty<LockScreenOption>());
sessionLocked = false;
}
else
{
logger.Info("Lock screen is already active.");
}
}
private void Server_TerminationRequested()