From 32e1621f3a9f15634fc2425d64e3e62e8a0431c1 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sun, 6 Mar 2022 09:07:01 +0200 Subject: [PATCH] StartDocked: Disable "Recommended" section works on newer OS builds (#995) --- ExplorerPatcher/lvt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ExplorerPatcher/lvt.c b/ExplorerPatcher/lvt.c index 42f5cff..3d29d47 100644 --- a/ExplorerPatcher/lvt.c +++ b/ExplorerPatcher/lvt.c @@ -594,7 +594,16 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply) Windows_UI_Xaml_IDependencyObject* pMainContent = LVT_FindChildByName(pRootContent, pVisualTreeHelperStatics, L"MainContent"); if (pMainContent) { + Windows_UI_Xaml_IDependencyObject* pInnerContent = NULL; Windows_UI_Xaml_IDependencyObject* pUndockedRoot = LVT_FindChildByName(pMainContent, pVisualTreeHelperStatics, L"UndockedRoot"); + if (!pUndockedRoot) + { + pInnerContent = LVT_FindChildByName(pMainContent, pVisualTreeHelperStatics, L"InnerContent"); + if (pInnerContent) + { + pUndockedRoot = LVT_FindChildByName(pInnerContent, pVisualTreeHelperStatics, L"UndockedRoot"); + } + } if (pUndockedRoot) { Windows_UI_Xaml_IDependencyObject* pStartInnerFrame = LVT_FindChildByClassName(pUndockedRoot, pVisualTreeHelperStatics, L"StartMenu.StartInnerFrame", NULL); @@ -657,6 +666,10 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply) } pUndockedRoot->lpVtbl->Release(pUndockedRoot); } + if (pInnerContent) + { + pInnerContent->lpVtbl->Release(pInnerContent); + } pMainContent->lpVtbl->Release(pMainContent); } pRootContent->lpVtbl->Release(pRootContent);