1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-01-19 01:04:08 +01:00

Spotlight: Harden desktop window detection

This commit is contained in:
Valentin Radu 2022-05-28 12:55:15 +03:00
parent 9bf60309c0
commit 9a7d2de43b

View File

@ -9235,7 +9235,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 && 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)) && bSpotlightIsDesktopContextMenu)
{
SpotlightHelper(dwSpotlightDesktopMenuMask, hWnd, hMenu, NULL);
}