diff --git a/src/modules/fancyzones/lib/Zone.cpp b/src/modules/fancyzones/lib/Zone.cpp index a7ad5e427e..91c7050ad7 100644 --- a/src/modules/fancyzones/lib/Zone.cpp +++ b/src/modules/fancyzones/lib/Zone.cpp @@ -105,11 +105,15 @@ void Zone::SizeWindowToZone(HWND window, HWND zoneWindow) noexcept } } - WINDOWPLACEMENT placement; + WINDOWPLACEMENT placement{}; ::GetWindowPlacement(window, &placement); placement.rcNormalPosition = zoneRect; placement.flags |= WPF_ASYNCWINDOWPLACEMENT; - placement.showCmd = SW_RESTORE | SW_SHOWNA; + // Do not restore minimized windows. We change their placement though so they restore to the correct zone. + if ((placement.showCmd & SW_SHOWMINIMIZED) == 0) + { + placement.showCmd = SW_RESTORE | SW_SHOWNA; + } ::SetWindowPlacement(window, &placement); }