From a90439d0964c188d15f949703f4a92d4bc25bd61 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sat, 6 Aug 2022 04:14:20 +0300 Subject: [PATCH] Main: Fix Windows Spotlight integration on OS builds 22621+ --- ExplorerPatcher/dllmain.c | 2 +- ExplorerPatcher/utility.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index ce177a2..035a3cd 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -9403,7 +9403,7 @@ BOOL shell32_DeleteMenu(HMENU hMenu, UINT uPosition, UINT uFlags) BOOL shell32_TrackPopupMenu(HMENU hMenu, UINT uFlags, int x, int y, int nReserved, HWND hWnd, const RECT* prcRect) { - if (IsSpotlightEnabled() && dwSpotlightDesktopMenuMask && (GetPropW(GetParent(hWnd), L"DesktopWindow") && RegisterWindowMessageW(L"WorkerW") == GetClassWord(GetParent(hWnd), GCW_ATOM)) && bSpotlightIsDesktopContextMenu) + if (IsSpotlightEnabled() && dwSpotlightDesktopMenuMask && (GetPropW(GetParent(hWnd), L"DesktopWindow") && (RegisterWindowMessageW(L"WorkerW") == GetClassWord(GetParent(hWnd), GCW_ATOM) || RegisterWindowMessageW(L"Progman") == GetClassWord(GetParent(hWnd), GCW_ATOM))) && bSpotlightIsDesktopContextMenu) { SpotlightHelper(dwSpotlightDesktopMenuMask, hWnd, hMenu, NULL); } diff --git a/ExplorerPatcher/utility.c b/ExplorerPatcher/utility.c index 7ed2506..0ebed8a 100644 --- a/ExplorerPatcher/utility.c +++ b/ExplorerPatcher/utility.c @@ -1469,7 +1469,7 @@ BOOL IsConnectedToInternet() BOOL DoesOSBuildSupportSpotlight() { - return global_rovi.dwBuildNumber >= 22000 && global_ubr >= 706; + return (global_rovi.dwBuildNumber == 22000 && global_ubr >= 706) || (global_rovi.dwBuildNumber >= 22598); } BOOL IsSpotlightEnabled()