[FancyZones] Remove app from app-zone-history when dragging starts (#23926)

This commit is contained in:
Seraphima Zykova
2023-02-07 12:14:24 +01:00
committed by GitHub
parent 7e008af00a
commit a6e0396290

View File

@@ -56,13 +56,15 @@ bool WindowDrag::MoveSizeStart(HMONITOR monitor, bool isSnapping)
return false; return false;
} }
if (isSnapping) m_currentWorkArea = iter->second.get();
{
m_currentWorkArea = iter->second.get();
}
SwitchSnappingMode(isSnapping); SwitchSnappingMode(isSnapping);
if (m_currentWorkArea)
{
m_currentWorkArea->UnsnapWindow(m_window);
}
return true; return true;
} }
@@ -169,7 +171,6 @@ void WindowDrag::SwitchSnappingMode(bool isSnapping)
if (m_currentWorkArea) if (m_currentWorkArea)
{ {
m_currentWorkArea->UnsnapWindow(m_window);
Trace::WorkArea::MoveOrResizeStarted(m_currentWorkArea->GetLayout().get(), m_currentWorkArea->GetLayoutWindows().get()); Trace::WorkArea::MoveOrResizeStarted(m_currentWorkArea->GetLayout().get(), m_currentWorkArea->GetLayoutWindows().get());
} }
} }