Skip to content

Commit 77d2d3a

Browse files
committed
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
1 parent 7044592 commit 77d2d3a

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

Src/StartMenu/StartMenuDLL/MenuContainer.cpp

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,23 @@ static const wchar_t *g_MfuIgnoreExes[]={
15891589
L"WUAPP.EXE",
15901590
};
15911591

1592+
static bool IgnoreUserAssistItem(const UserAssistItem& uaItem)
1593+
{
1594+
static constexpr const wchar_t* ignoredNames[] =
1595+
{
1596+
DESKTOP_APP_ID,
1597+
L"Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy!App",
1598+
};
1599+
1600+
for (const auto& name : ignoredNames)
1601+
{
1602+
if (_wcsicmp(uaItem.name, name) == 0)
1603+
return true;
1604+
}
1605+
1606+
return false;
1607+
}
1608+
15921609
void CMenuContainer::GetRecentPrograms( std::vector<MenuItem> &items, int maxCount )
15931610
{
15941611
bool bShowMetro=GetSettingBool(L"RecentMetroApps");
@@ -1941,9 +1958,9 @@ void CMenuContainer::GetRecentPrograms( std::vector<MenuItem> &items, int maxCou
19411958
continue;
19421959
}
19431960

1944-
if (_wcsicmp(uaItem.name,DESKTOP_APP_ID)==0)
1961+
if (IgnoreUserAssistItem(uaItem))
19451962
{
1946-
LOG_MENU(LOG_MFU,L"UserAssist: Dropping: Ignore desktop");
1963+
LOG_MENU(LOG_MFU,L"UserAssist: Dropping: Ignore '%s'",uaItem.name);
19471964
continue;
19481965
}
19491966

0 commit comments

Comments
 (0)