[FancyZones] App zone history on multiple desktops (#3932)

* Remove app zone history belonging to deleted virtual desktop.

* Implement support fancy zones app zone history on multiple desktops.

* Break when device id is located to avoid unnecessary loop iterations.

* Fix failing unit tests after JSONHelpers API changes.

* Use valid UUIDs in json helper unit tests.

* User properly formated test data in app zone history unit tests.

* Don't delete entire app history when moving out of zone on one desktop.
This commit is contained in:
vldmr11080
2020-06-05 17:25:52 +02:00
committed by GitHub
parent 8410d7b08e
commit b0b2d3a727
7 changed files with 437 additions and 215 deletions

View File

@@ -73,7 +73,7 @@ bool MonitorWorkAreaHandler::IsNewWorkArea(const GUID& desktopId, HMONITOR monit
return true;
}
void MonitorWorkAreaHandler::RegisterUpdates(const std::vector<GUID>& active, std::vector<GUID>& deleted)
void MonitorWorkAreaHandler::RegisterUpdates(const std::vector<GUID>& active)
{
std::unordered_set<GUID> activeVirtualDesktops(std::begin(active), std::end(active));
for (auto desktopIt = std::begin(workAreaMap); desktopIt != std::end(workAreaMap);)
@@ -81,8 +81,7 @@ void MonitorWorkAreaHandler::RegisterUpdates(const std::vector<GUID>& active, st
auto activeIt = activeVirtualDesktops.find(desktopIt->first);
if (activeIt == std::end(activeVirtualDesktops))
{
// register deleted virtual desktop
deleted.push_back(desktopIt->first);
// virtual desktop deleted, remove entry from the map
desktopIt = workAreaMap.erase(desktopIt);
}
else