fix excluded apps check (#30138)

This commit is contained in:
Seraphima Zykova
2023-12-08 12:48:36 +01:00
committed by GitHub
parent 3e7cc723a5
commit b3804a9f38
3 changed files with 15 additions and 13 deletions

View File

@@ -202,12 +202,12 @@ bool FancyZonesWindowUtils::IsExcluded(HWND window)
return false;
}
bool FancyZonesWindowUtils::IsExcludedByUser(const HWND& hwnd, std::wstring& processPath) noexcept
bool FancyZonesWindowUtils::IsExcludedByUser(const HWND& hwnd, const std::wstring& processPath) noexcept
{
return (check_excluded_app(hwnd, processPath, FancyZonesSettings::settings().excludedAppsArray));
}
bool FancyZonesWindowUtils::IsExcludedByDefault(const HWND& hwnd, std::wstring& processPath) noexcept
bool FancyZonesWindowUtils::IsExcludedByDefault(const HWND& hwnd, const std::wstring& processPath) noexcept
{
static std::vector<std::wstring> defaultExcludedFolders = { NonLocalizable::SystemAppsFolder };
if (find_folder_in_path(processPath, defaultExcludedFolders))

View File

@@ -27,8 +27,8 @@ namespace FancyZonesWindowUtils
bool IsProcessOfWindowElevated(HWND window); // If HWND is already dead, we assume it wasn't elevated
bool IsExcluded(HWND window);
bool IsExcludedByUser(const HWND& hwnd, std::wstring& processPath) noexcept;
bool IsExcludedByDefault(const HWND& hwnd, std::wstring& processPath) noexcept;
bool IsExcludedByUser(const HWND& hwnd, const std::wstring& processPath) noexcept;
bool IsExcludedByDefault(const HWND& hwnd, const std::wstring& processPath) noexcept;
void SwitchToWindow(HWND window) noexcept;
void SizeWindowToRect(HWND window, RECT rect) noexcept; // Parameter rect must be in screen coordinates (e.g. obtained from GetWindowRect)