Skip to content

Commit

Permalink
[FancyZones] Do not snap child windows via the "Win+Arrow" shortcut (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
SeraphimaZykova committed Dec 22, 2021
1 parent f280170 commit 7d0304f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/modules/fancyzones/FancyZonesLib/FancyZones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ void FancyZones::WindowCreated(HWND window) noexcept
return;
}

const bool isCandidateForLastKnownZone = FancyZonesUtils::IsCandidateForLastKnownZone(window, m_settings->GetSettings()->excludedAppsArray);
const bool isCandidateForLastKnownZone = FancyZonesUtils::IsCandidateForZoning(window, m_settings->GetSettings()->excludedAppsArray);
if (!isCandidateForLastKnownZone)
{
return;
Expand Down
12 changes: 1 addition & 11 deletions src/modules/fancyzones/FancyZonesLib/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ namespace FancyZonesUtils
return true;
}

bool IsCandidateForLastKnownZone(HWND window, const std::vector<std::wstring>& excludedApps) noexcept
bool IsCandidateForZoning(HWND window, const std::vector<std::wstring>& excludedApps) noexcept
{
auto zonable = IsStandardWindow(window) && HasNoVisibleOwner(window);
if (!zonable)
Expand All @@ -452,16 +452,6 @@ namespace FancyZonesUtils
return IsZonableByProcessPath(get_process_path(window), excludedApps);
}

bool IsCandidateForZoning(HWND window, const std::vector<std::wstring>& excludedApps) noexcept
{
if (!IsStandardWindow(window))
{
return false;
}

return IsZonableByProcessPath(get_process_path(window), excludedApps);
}

bool IsWindowMaximized(HWND window) noexcept
{
WINDOWPLACEMENT placement{};
Expand Down
1 change: 0 additions & 1 deletion src/modules/fancyzones/FancyZonesLib/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ namespace FancyZonesUtils

bool HasNoVisibleOwner(HWND window) noexcept;
bool IsStandardWindow(HWND window);
bool IsCandidateForLastKnownZone(HWND window, const std::vector<std::wstring>& excludedApps) noexcept;
bool IsCandidateForZoning(HWND window, const std::vector<std::wstring>& excludedApps) noexcept;

bool IsWindowMaximized(HWND window) noexcept;
Expand Down

0 comments on commit 7d0304f

Please sign in to comment.