[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:
Ivan Stošić
2020-05-26 16:01:12 +02:00
committed by GitHub
parent bc9add783c
commit 6f22c7ad19
17 changed files with 349 additions and 881 deletions

View File

@@ -116,9 +116,9 @@ void WindowMoveHandler::MoveSizeEnd(HWND window, POINT const& ptScreen, const st
pimpl->MoveSizeEnd(window, ptScreen, zoneWindowMap);
}
void WindowMoveHandler::MoveWindowIntoZoneByIndex(HWND window, HMONITOR monitor, int index, const std::map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap) noexcept
void WindowMoveHandler::MoveWindowIntoZoneByIndexSet(HWND window, HMONITOR monitor, const std::vector<int>& indexSet, const std::map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap) noexcept
{
pimpl->MoveWindowIntoZoneByIndexSet(window, monitor, { index }, zoneWindowMap);
pimpl->MoveWindowIntoZoneByIndexSet(window, monitor, indexSet, zoneWindowMap);
}
bool WindowMoveHandler::MoveWindowIntoZoneByDirection(HMONITOR monitor, HWND window, DWORD vkCode, bool cycle, const std::map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap)
@@ -256,7 +256,7 @@ void WindowMoveHandlerPrivate::MoveSizeEnd(HWND window, POINT const& ptScreen, c
}
else
{
::RemoveProp(window, ZONE_STAMP);
::RemoveProp(window, MULTI_ZONE_STAMP);
auto monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL);
if (monitor)