From 5bdf910e546c6f690edb50aaa897239c902c5d1d Mon Sep 17 00:00:00 2001 From: dbuechel Date: Tue, 26 Mar 2019 10:56:09 +0100 Subject: [PATCH] SEBWIN-117: Fixed minor issue overwriting the actual original working area on display changes. --- SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs b/SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs index decd5b15..6cb6da37 100644 --- a/SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs +++ b/SafeExamBrowser.Monitoring/Display/DisplayMonitor.cs @@ -75,8 +75,11 @@ namespace SafeExamBrowser.Monitoring.Display { var identifier = GetIdentifierForPrimaryDisplay(); - originalWorkingArea = nativeMethods.GetWorkingArea(); - LogWorkingArea($"Saved original working area for {identifier}", originalWorkingArea); + if (originalWorkingArea == null) + { + originalWorkingArea = nativeMethods.GetWorkingArea(); + LogWorkingArea($"Saved original working area for {identifier}", originalWorkingArea); + } var area = new Bounds {