mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
[FancyZones]Remove check if window already snapped (#17512)
This commit is contained in:
@@ -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
|
void FancyZones::MoveWindowIntoZone(HWND window, winrt::com_ptr<IWorkArea> workArea, const ZoneIndexSet& zoneIndexSet) noexcept
|
||||||
{
|
{
|
||||||
if (!AppZoneHistory::instance().IsAnotherWindowOfApplicationInstanceZoned(window, workArea->UniqueId()))
|
if (workArea)
|
||||||
{
|
{
|
||||||
if (workArea)
|
Trace::FancyZones::SnapNewWindowIntoZone(workArea->ZoneSet());
|
||||||
{
|
|
||||||
Trace::FancyZones::SnapNewWindowIntoZone(workArea->ZoneSet());
|
|
||||||
}
|
|
||||||
m_windowMoveHandler.MoveWindowIntoZoneByIndexSet(window, zoneIndexSet, workArea);
|
|
||||||
AppZoneHistory::instance().UpdateProcessIdToHandleMap(window, workArea->UniqueId());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Logger::info(L"Window was already zoned");
|
|
||||||
}
|
}
|
||||||
|
m_windowMoveHandler.MoveWindowIntoZoneByIndexSet(window, zoneIndexSet, workArea);
|
||||||
|
AppZoneHistory::instance().UpdateProcessIdToHandleMap(window, workArea->UniqueId());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FancyZones::MoveToAppLastZone(HWND window, HMONITOR active, HMONITOR primary) noexcept
|
bool FancyZones::MoveToAppLastZone(HWND window, HMONITOR active, HMONITOR primary) noexcept
|
||||||
|
|||||||
Reference in New Issue
Block a user