Revert "[FancyZones] Remove "keep windows pinned to virtual desktop location" settings (#3093)" (#3292)

This reverts commit 8f59247acb.
This commit is contained in:
Andrey Nekrasov
2020-05-20 11:57:17 +03:00
committed by GitHub
parent 8f59247acb
commit 2eecaf4570
15 changed files with 115 additions and 21 deletions

View File

@@ -325,6 +325,7 @@ FancyZones::VirtualDesktopChanged() noexcept
{
// VirtualDesktopChanged is called from a reentrant WinHookProc function, therefore we must postpone the actual logic
// until we're in FancyZones::WndProc, which is not reentrant.
std::shared_lock readLock(m_lock);
PostMessage(m_window, WM_PRIV_VD_SWITCH, 0, 0);
}
@@ -693,6 +694,13 @@ void FancyZones::OnDisplayChange(DisplayChangeType changeType) noexcept
UpdateWindowsPositions();
}
}
else if (changeType == DisplayChangeType::VirtualDesktop)
{
if (m_settings->GetSettings()->virtualDesktopChange_moveWindows)
{
UpdateWindowsPositions();
}
}
}
void FancyZones::AddZoneWindow(HMONITOR monitor, PCWSTR deviceId) noexcept