From c641bce5a1d98c36c66c4d687a8370805ab848cc Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Tue, 3 Jan 2023 10:07:41 +1300 Subject: [PATCH] Removed delay from taskbar location monitoring The taskbar location detection process was taking way too long when clicking on the 'view current display' button on the display window. Do I have had to disable the taskbar location detection logic for now until I can work out way of doing it without waiting for registry changes (as it is done now). This was required in order to be able to detect the taskbar location registry settings so that we could store them to use them later. This taskbar registry detection doesn't work at present as it is highly unreliable, and it delays the user experience for the other 99% of the time. Its just not worth the effort right now, so parking this for now. To temporarily disable this being used, I've simply forced the WindowsLibrary fastscan mode to be enabled (fastscan being on means it won't do taskbar location scanning). --- DisplayMagician/Properties/AssemblyInfo.cs | 4 ++-- DisplayMagicianShared/Windows/WinLibrary.cs | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DisplayMagician/Properties/AssemblyInfo.cs b/DisplayMagician/Properties/AssemblyInfo.cs index 2d6950d..00094a1 100644 --- a/DisplayMagician/Properties/AssemblyInfo.cs +++ b/DisplayMagician/Properties/AssemblyInfo.cs @@ -26,8 +26,8 @@ using System.Resources; [assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")] // Version information -[assembly: AssemblyVersion("2.5.0.337")] -[assembly: AssemblyFileVersion("2.5.0.337")] +[assembly: AssemblyVersion("2.5.0.338")] +[assembly: AssemblyFileVersion("2.5.0.338")] [assembly: NeutralResourcesLanguageAttribute( "en" )] [assembly: CLSCompliant(true)] diff --git a/DisplayMagicianShared/Windows/WinLibrary.cs b/DisplayMagicianShared/Windows/WinLibrary.cs index 043c205..05835e6 100644 --- a/DisplayMagicianShared/Windows/WinLibrary.cs +++ b/DisplayMagicianShared/Windows/WinLibrary.cs @@ -500,6 +500,10 @@ namespace DisplayMagicianShared.Windows private WINDOWS_DISPLAY_CONFIG GetWindowsDisplayConfig(QDC selector = QDC.QDC_ONLY_ACTIVE_PATHS, bool fastScan = true) { + // Forcing fastscan to stop the taskbar location scanning delaying the user experience + // TODO: Find a replacement method of doing the taskbar location detection. Microsoft may have made things easier in Windows 11 by now.... + fastScan = true; + // Prepare the empty windows display config WINDOWS_DISPLAY_CONFIG windowsDisplayConfig = CreateDefaultConfig();