Some refactoring of FancyZones::IsInterestingWindow and added Unit Tests (#1521)

* Some refactoring of FancyZones::IsInterestingWindow and added UnitTests
This commit is contained in:
Yevhenii Holovachov
2020-03-16 14:25:30 +02:00
committed by GitHub
parent 04027b9c32
commit 02857d1b7f
6 changed files with 85 additions and 6 deletions

View File

@@ -706,12 +706,10 @@ bool FancyZones::IsInterestingWindow(HWND window) noexcept
CharUpperBuffW(filtered.process_path.data(), (DWORD)filtered.process_path.length());
if (m_settings)
{
for (const auto& excluded : m_settings->GetSettings()->excludedAppsArray)
const auto& excludedAppsArray = m_settings->GetSettings()->excludedAppsArray;
if (find_app_name_in_path(filtered.process_path, excludedAppsArray))
{
if (filtered.process_path.find(excluded) != std::wstring::npos)
{
return false;
}
return false;
}
}
return true;