Browse Source

Fixed bug that made the "modern search box" display incorrectly

pull/20/head
Valentin Radu 4 years ago
parent
commit
4099068c5d
  1. 9
      ExplorerPatcher/dllmain.c

9
ExplorerPatcher/dllmain.c

@ -4257,10 +4257,14 @@ LRESULT CJupiterWindow_StaticCoreWindowSubclassProcHook( @@ -4257,10 +4257,14 @@ LRESULT CJupiterWindow_StaticCoreWindowSubclassProcHook(
FreeLibrary(hModule);
if (!dwStatus)
{
BOOL bIsAtBottom = FALSE, bIsAtRight = FALSE;
POINT pt = GetDefaultWinXPosition(TRUE, &bIsAtBottom, &bIsAtRight);
RECT rc;
GetWindowRect(hWnd, &rc);
if (rc.top > 10) // this differentiates between the search
// interface (Win+Q) and the search box in
// Explorer
{
BOOL bIsAtBottom = FALSE, bIsAtRight = FALSE;
POINT pt = GetDefaultWinXPosition(TRUE, &bIsAtBottom, &bIsAtRight);
LPWINDOWPOS wp = lParam;
wp->x = pt.x - (bIsAtRight ? (rc.right - rc.left) : 0);
wp->y = pt.y - (bIsAtBottom ? (rc.bottom - rc.top) : 0);
@ -4269,6 +4273,7 @@ LRESULT CJupiterWindow_StaticCoreWindowSubclassProcHook( @@ -4269,6 +4273,7 @@ LRESULT CJupiterWindow_StaticCoreWindowSubclassProcHook(
}
}
}
}
return CJupiterWindow_StaticCoreWindowSubclassProcFunc(hWnd, uMsg, wParam, lParam);
}

Loading…
Cancel
Save