mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[FancyZones]Fix snap by hotkey for single-zone layouts (#22373)
* unsnap window from previous work area when snapping by hotkey
This commit is contained in:
@@ -462,6 +462,22 @@ void WorkArea::SaveWindowProcessToZoneIndex(HWND window) noexcept
|
||||
}
|
||||
}
|
||||
|
||||
bool WorkArea::UnsnapWindow(HWND window) noexcept
|
||||
{
|
||||
if (!m_layoutWindows)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_layoutWindows->GetZoneIndexSetFromWindow(window).empty())
|
||||
{
|
||||
m_layoutWindows->Dismiss(window);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ZoneIndexSet WorkArea::GetWindowZoneIndexes(HWND window) const noexcept
|
||||
{
|
||||
if (m_layout)
|
||||
|
||||
Reference in New Issue
Block a user