mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[FancyZones] Do not restore maximized windows (#5597)
* Do not restore maximized windows * Fix show command comparison * Move maximized check outside of RestoreWindowSize function
This commit is contained in:
@@ -177,6 +177,17 @@ bool IsInterestingWindow(HWND window, const std::vector<std::wstring>& excludedA
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IsWindowMaximized(HWND window) noexcept
|
||||
{
|
||||
WINDOWPLACEMENT placement{};
|
||||
if (GetWindowPlacement(window, &placement) &&
|
||||
placement.showCmd == SW_SHOWMAXIMIZED)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SaveWindowSizeAndOrigin(HWND window) noexcept
|
||||
{
|
||||
HANDLE handle = GetPropW(window, RESTORE_SIZE_STAMP);
|
||||
|
||||
Reference in New Issue
Block a user