Skip to content

Commit

Permalink
[FancyZones]Remove check if window already snapped (microsoft#17512)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeraphimaZykova authored Apr 4, 2022
1 parent fd01ee3 commit c7e0850
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/modules/fancyzones/FancyZonesLib/FancyZones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,19 +333,12 @@ std::pair<winrt::com_ptr<IWorkArea>, ZoneIndexSet> FancyZones::GetAppZoneHistory

void FancyZones::MoveWindowIntoZone(HWND window, winrt::com_ptr<IWorkArea> workArea, const ZoneIndexSet& zoneIndexSet) noexcept
{
if (!AppZoneHistory::instance().IsAnotherWindowOfApplicationInstanceZoned(window, workArea->UniqueId()))
{
if (workArea)
{
Trace::FancyZones::SnapNewWindowIntoZone(workArea->ZoneSet());
}
m_windowMoveHandler.MoveWindowIntoZoneByIndexSet(window, zoneIndexSet, workArea);
AppZoneHistory::instance().UpdateProcessIdToHandleMap(window, workArea->UniqueId());
}
else
if (workArea)
{
Logger::info(L"Window was already zoned");
Trace::FancyZones::SnapNewWindowIntoZone(workArea->ZoneSet());
}
m_windowMoveHandler.MoveWindowIntoZoneByIndexSet(window, zoneIndexSet, workArea);
AppZoneHistory::instance().UpdateProcessIdToHandleMap(window, workArea->UniqueId());
}

bool FancyZones::MoveToAppLastZone(HWND window, HMONITOR active, HMONITOR primary) noexcept
Expand Down

0 comments on commit c7e0850

Please sign in to comment.