Browse Source

Fixed #589 (Windows 11 secondary taskbar is not shown when mouse overed and auto hide is on)

pull/886/head
Valentin Radu 4 years ago
parent
commit
5a1b2dd389
  1. 13
      ExplorerPatcher/dllmain.c

13
ExplorerPatcher/dllmain.c

@ -1425,13 +1425,18 @@ INT64 Shell_TrayWndSubclassProc( @@ -1425,13 +1425,18 @@ INT64 Shell_TrayWndSubclassProc(
_In_ WPARAM wParam,
_In_ LPARAM lParam,
UINT_PTR uIdSubclass,
DWORD_PTR dwRefData
DWORD_PTR bIsPrimaryTaskbar
)
{
if (uMsg == WM_NCDESTROY)
{
RemoveWindowSubclass(hWnd, Shell_TrayWndSubclassProc, Shell_TrayWndSubclassProc);
}
else if (!bIsPrimaryTaskbar && uMsg == WM_SETCURSOR)
{
// Received when mouse is over taskbar edge and autohide is on
PostMessageW(hWnd, WM_ACTIVATE, WA_ACTIVE, NULL);
}
else if (uMsg == WM_LBUTTONDBLCLK && bTaskbarAutohideOnDoubleClick)
{
APPBARDATA abd;
@ -4423,7 +4428,11 @@ HWND CreateWindowExWHook( @@ -4423,7 +4428,11 @@ HWND CreateWindowExWHook(
}
else if (bIsExplorerProcess && (*((WORD*)&(lpClassName)+1)) && !wcscmp(lpClassName, L"Shell_TrayWnd"))
{
SetWindowSubclass(hWnd, Shell_TrayWndSubclassProc, Shell_TrayWndSubclassProc, 0);
SetWindowSubclass(hWnd, Shell_TrayWndSubclassProc, Shell_TrayWndSubclassProc, TRUE);
}
else if (bIsExplorerProcess && (*((WORD*)&(lpClassName)+1)) && !wcscmp(lpClassName, L"Shell_SecondaryTrayWnd"))
{
SetWindowSubclass(hWnd, Shell_TrayWndSubclassProc, Shell_TrayWndSubclassProc, FALSE);
}
#endif
/*

Loading…
Cancel
Save