mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-11 12:14:53 +08:00
[FancyZones] Do not try to zone minimized windows (#11776)
This commit is contained in:
parent
c93eb92cd0
commit
eeea6b3bae
@ -221,7 +221,6 @@ protected:
|
|||||||
static LRESULT CALLBACK s_WndProc(HWND, UINT, WPARAM, LPARAM) noexcept;
|
static LRESULT CALLBACK s_WndProc(HWND, UINT, WPARAM, LPARAM) noexcept;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void UpdateZoneWindows(require_write_lock) noexcept;
|
void UpdateZoneWindows(require_write_lock) noexcept;
|
||||||
void UpdateWindowsPositions(require_write_lock) noexcept;
|
void UpdateWindowsPositions(require_write_lock) noexcept;
|
||||||
bool OnSnapHotkeyBasedOnZoneNumber(HWND window, DWORD vkCode) noexcept;
|
bool OnSnapHotkeyBasedOnZoneNumber(HWND window, DWORD vkCode) noexcept;
|
||||||
@ -554,9 +553,10 @@ FancyZones::WindowCreated(HWND window) noexcept
|
|||||||
bool windowZoned{ false };
|
bool windowZoned{ false };
|
||||||
if (moveToAppLastZone)
|
if (moveToAppLastZone)
|
||||||
{
|
{
|
||||||
const bool primaryActive = (primary == active);
|
const bool primaryActive = primary == active;
|
||||||
std::pair<winrt::com_ptr<IZoneWindow>, std::vector<size_t>> appZoneHistoryInfo = GetAppZoneHistoryInfo(window, active, primaryActive);
|
std::pair<winrt::com_ptr<IZoneWindow>, std::vector<size_t>> appZoneHistoryInfo = GetAppZoneHistoryInfo(window, active, primaryActive);
|
||||||
if (!appZoneHistoryInfo.second.empty())
|
const bool windowMinimized = IsIconic(window);
|
||||||
|
if (!appZoneHistoryInfo.second.empty() && !windowMinimized)
|
||||||
{
|
{
|
||||||
MoveWindowIntoZone(window, appZoneHistoryInfo.first, appZoneHistoryInfo.second);
|
MoveWindowIntoZone(window, appZoneHistoryInfo.first, appZoneHistoryInfo.second);
|
||||||
windowZoned = true;
|
windowZoned = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user