Browse Source

Spotlight: Harden desktop window detection

pull/1138/head
Valentin Radu 4 years ago
parent
commit
9a7d2de43b
  1. 2
      ExplorerPatcher/dllmain.c

2
ExplorerPatcher/dllmain.c

@ -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) 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); SpotlightHelper(dwSpotlightDesktopMenuMask, hWnd, hMenu, NULL);
} }

Loading…
Cancel
Save