changed window filter

https://github.com/JaneaSystems/PowerToys-DevProjects/issues/2
This commit is contained in:
seraphima
2024-07-02 15:47:24 +02:00
parent db8935dca3
commit c00ed8f996
2 changed files with 8 additions and 10 deletions

View File

@@ -89,7 +89,7 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdLine, int cm
}
auto data = Utils::Apps::GetApp(processPath, apps);
if (!data.has_value())
if (!data.has_value() || data->name.empty())
{
continue;
}

View File

@@ -15,14 +15,15 @@ namespace WindowUtils
// Non-Localizable strings
namespace NonLocalizable
{
const wchar_t SystemAppsFolder[] = L"SYSTEMAPPS";
const wchar_t System[] = L"WINDOWS/SYSTEM";
const wchar_t System32[] = L"SYSTEM32";
const wchar_t SystemWOW64[] = L"SYSTEMWOW64";
const char SplashClassName[] = "MsoSplash";
const wchar_t SystemAppsFolder[] = L"SYSTEMAPPS";
const wchar_t CoreWindow[] = L"WINDOWS.UI.CORE.COREWINDOW";
const wchar_t SearchUI[] = L"SEARCHUI.EXE";
const wchar_t HelpWindow[] = L"C:\\WINDOWS\\HH.EXE";
const wchar_t HelpWindow[] = L"WINDOWS\\HH.EXE";
const wchar_t ApplicationFrameHost[] = L"WINDOWS\\SYSTEM32\\APPLICATIONFRAMEHOST.EXE";
const wchar_t ProjectsSnapshotTool[] = L"POWERTOYS.PROJECTSSNAPSHOTTOOL";
const wchar_t ProjectsEditor[] = L"POWERTOYS.PROJECTSEDITOR";
const wchar_t ProjectsLauncher[] = L"POWERTOYS.PROJECTSLAUNCHER";
@@ -55,10 +56,7 @@ namespace WindowUtils
CharUpperBuffW(processPathUpper.data(), static_cast<DWORD>(processPathUpper.length()));
static std::vector<std::wstring> defaultExcludedFolders = {
NonLocalizable::SystemAppsFolder,
NonLocalizable::System,
NonLocalizable::System32,
NonLocalizable::SystemWOW64
NonLocalizable::SystemAppsFolder,
};
if (find_folder_in_path(processPathUpper, defaultExcludedFolders))
{