mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[FancyZones] Snap out of maximized window into zones with win + left/right arrow (#3097)
* Snap out of maximized window into zones with win + left/right arrow. * Determine if there is anything to process before swallowing keypress.
This commit is contained in:
@@ -128,6 +128,13 @@ void SizeWindowToRect(HWND window, RECT rect) noexcept
|
||||
placement.showCmd = SW_RESTORE | SW_SHOWNA;
|
||||
}
|
||||
|
||||
// Remove maximized show command to make sure window is moved to the correct zone.
|
||||
if (placement.showCmd & SW_SHOWMAXIMIZED)
|
||||
{
|
||||
placement.showCmd = SW_RESTORE;
|
||||
placement.flags &= ~WPF_RESTORETOMAXIMIZED;
|
||||
}
|
||||
|
||||
placement.rcNormalPosition = rect;
|
||||
placement.flags |= WPF_ASYNCWINDOWPLACEMENT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user