mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[FancyZones] Added persistence to app zone history (#3132)
* Persist app zone history in a separate file * Almost ready to be functionally tested * Now all unit tests pass * Bug fixes, it seems to work * Various fixups * Improved performance of FancyZones::UpdateWindowsPositions()
This commit is contained in:
@@ -24,10 +24,14 @@ ZoneSetInfo GetZoneSetInfo(_In_opt_ winrt::com_ptr<IZoneSet> set) noexcept
|
||||
{
|
||||
auto zones = set->GetZones();
|
||||
info.NumberOfZones = zones.size();
|
||||
info.NumberOfWindows = std::count_if(zones.cbegin(), zones.cend(), [&](winrt::com_ptr<IZone> zone)
|
||||
info.NumberOfWindows = 0;
|
||||
for (int i = 0; i < static_cast<int>(zones.size()); i++)
|
||||
{
|
||||
return !zone->IsEmpty();
|
||||
});
|
||||
if (!set->IsZoneEmpty(i))
|
||||
{
|
||||
info.NumberOfWindows++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user