mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-06-14 03:16:38 +10:00
Don't show Windows Shell Experience Host in list of frequent programs
It is not a program that user will use explicitly. No need to show it in the list even if Windows tracks it as frequent program for some reason. Fixes #1164
This commit is contained in:
@@ -1589,6 +1589,23 @@ static const wchar_t *g_MfuIgnoreExes[]={
|
|||||||
L"WUAPP.EXE",
|
L"WUAPP.EXE",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static bool IgnoreUserAssistItem(const UserAssistItem& uaItem)
|
||||||
|
{
|
||||||
|
static constexpr const wchar_t* ignoredNames[] =
|
||||||
|
{
|
||||||
|
DESKTOP_APP_ID,
|
||||||
|
L"Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy!App",
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const auto& name : ignoredNames)
|
||||||
|
{
|
||||||
|
if (_wcsicmp(uaItem.name, name) == 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void CMenuContainer::GetRecentPrograms( std::vector<MenuItem> &items, int maxCount )
|
void CMenuContainer::GetRecentPrograms( std::vector<MenuItem> &items, int maxCount )
|
||||||
{
|
{
|
||||||
bool bShowMetro=GetSettingBool(L"RecentMetroApps");
|
bool bShowMetro=GetSettingBool(L"RecentMetroApps");
|
||||||
@@ -1941,9 +1958,9 @@ void CMenuContainer::GetRecentPrograms( std::vector<MenuItem> &items, int maxCou
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_wcsicmp(uaItem.name,DESKTOP_APP_ID)==0)
|
if (IgnoreUserAssistItem(uaItem))
|
||||||
{
|
{
|
||||||
LOG_MENU(LOG_MFU,L"UserAssist: Dropping: Ignore desktop");
|
LOG_MENU(LOG_MFU,L"UserAssist: Dropping: Ignore '%s'",uaItem.name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user