mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-11 12:14:53 +08:00
When moving window to a zone, ensure it does not remain in maximized state.
This commit is contained in:
parent
1a400bd7fd
commit
b85f722e09
@ -74,7 +74,13 @@ void Zone::SizeWindowToZone(HWND window, HWND zoneWindow) noexcept
|
||||
|
||||
// Map to screen coords
|
||||
MapWindowRect(zoneWindow, nullptr, &zoneRect);
|
||||
::SetWindowPos(window, nullptr, zoneRect.left, zoneRect.top, zoneRect.right - zoneRect.left, zoneRect.bottom - zoneRect.top, SWP_NOZORDER | SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
|
||||
|
||||
WINDOWPLACEMENT placement;
|
||||
::GetWindowPlacement(window, &placement);
|
||||
placement.rcNormalPosition = zoneRect;
|
||||
placement.flags |= WPF_ASYNCWINDOWPLACEMENT;
|
||||
placement.showCmd = SW_RESTORE | SW_SHOWNA;
|
||||
::SetWindowPlacement(window, &placement);
|
||||
}
|
||||
|
||||
void Zone::StampZone(HWND window, bool stamp) noexcept
|
||||
|
Loading…
Reference in New Issue
Block a user