[FancyZones]Monitor identification (#19077)

* moved monitors identifying

* changed device id

* get wmi info

* convert old data

* save/load applied layouts

* changed monitor identification

* id comparison

* save/load app zone history

* moved com and security init

* update ids in editor

* lib fix

* updated tests

* changed comparison

* tests

* updated id comparison

* updated log

* moved definition

* spell check

* resolve conflicts

* refactoring

* update serial numbers if possible
This commit is contained in:
Seraphima Zykova
2022-07-01 17:29:02 +02:00
committed by GitHub
parent 3cb0638c7e
commit 35bb4280d0
30 changed files with 1084 additions and 408 deletions

View File

@@ -120,7 +120,7 @@ WorkArea::~WorkArea()
windowPool.FreeZonesOverlayWindow(m_window);
}
bool WorkArea::Init(HINSTANCE hinstance, const FancyZonesDataTypes::DeviceIdData& uniqueId, const FancyZonesDataTypes::DeviceIdData& parentUniqueId)
bool WorkArea::Init(HINSTANCE hinstance, const FancyZonesDataTypes::WorkAreaId& uniqueId, const FancyZonesDataTypes::WorkAreaId& parentUniqueId)
{
m_uniqueId = uniqueId;
InitializeZoneSets(parentUniqueId);
@@ -378,13 +378,9 @@ void WorkArea::FlashZones() noexcept
#pragma region private
void WorkArea::InitializeZoneSets(const FancyZonesDataTypes::DeviceIdData& parentUniqueId) noexcept
void WorkArea::InitializeZoneSets(const FancyZonesDataTypes::WorkAreaId& parentUniqueId) noexcept
{
wil::unique_cotaskmem_string virtualDesktopId;
if (SUCCEEDED(StringFromCLSID(m_uniqueId.virtualDesktopId, &virtualDesktopId)))
{
Logger::debug(L"Initialize layout on the virtual desktop {}", virtualDesktopId.get());
}
Logger::info(L"Initialize layout on {}", m_uniqueId.toString());
bool isLayoutAlreadyApplied = AppliedLayouts::instance().IsLayoutApplied(m_uniqueId);
if (!isLayoutAlreadyApplied)