Skip to content

Commit 9106226

Browse files
authored
Fix Hiding of Recommended Section on Win 11 24h2 (#4476)
* Fix hiding the 'recommended' section in win11 24h2 * Fix indentation * fix wrong parent --------- Co-authored-by: Matthew Wigley <>
1 parent c3c83ff commit 9106226

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ExplorerPatcher/lvt.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,13 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply, RECT* rec
714714
Windows_UI_Xaml_IDependencyObject* pLauncherFrame = LVT_FindChildByClassName(pContentPresenter2, pVisualTreeHelperStatics, L"StartDocked.LauncherFrame", NULL);
715715
if (pLauncherFrame)
716716
{
717-
Windows_UI_Xaml_IDependencyObject* pRootGrid = LVT_FindChildByName(pLauncherFrame, pVisualTreeHelperStatics, L"RootGrid");
717+
Windows_UI_Xaml_IDependencyObject* pRootPanel = LVT_FindChildByName(pLauncherFrame, pVisualTreeHelperStatics, L"RootPanel");
718+
Windows_UI_Xaml_IDependencyObject* pRootGridParent = pRootPanel;
719+
if (!pRootGridParent)
720+
{
721+
pRootGridParent = pLauncherFrame;
722+
}
723+
Windows_UI_Xaml_IDependencyObject* pRootGrid = LVT_FindChildByName(pRootGridParent, pVisualTreeHelperStatics, L"RootGrid");
718724
if (pRootGrid)
719725
{
720726
Windows_UI_Xaml_IDependencyObject* pRootContent = LVT_FindChildByName(pRootGrid, pVisualTreeHelperStatics, L"RootContent");
@@ -809,6 +815,10 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply, RECT* rec
809815
}
810816
pRootGrid->lpVtbl->Release(pRootGrid);
811817
}
818+
if (pRootPanel)
819+
{
820+
pRootPanel->lpVtbl->Release(pRootPanel);
821+
}
812822
pLauncherFrame->lpVtbl->Release(pLauncherFrame);
813823
}
814824
pContentPresenter2->lpVtbl->Release(pContentPresenter2);

0 commit comments

Comments
 (0)