mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user