mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-27 17:00:59 +01:00
Fixed bug that made the "modern search box" display incorrectly
This commit is contained in:
parent
b31ccfde6a
commit
4099068c5d
@ -4257,15 +4257,20 @@ LRESULT CJupiterWindow_StaticCoreWindowSubclassProcHook(
|
||||
FreeLibrary(hModule);
|
||||
if (!dwStatus)
|
||||
{
|
||||
BOOL bIsAtBottom = FALSE, bIsAtRight = FALSE;
|
||||
POINT pt = GetDefaultWinXPosition(TRUE, &bIsAtBottom, &bIsAtRight);
|
||||
RECT rc;
|
||||
GetWindowRect(hWnd, &rc);
|
||||
LPWINDOWPOS wp = lParam;
|
||||
wp->x = pt.x - (bIsAtRight ? (rc.right - rc.left) : 0);
|
||||
wp->y = pt.y - (bIsAtBottom ? (rc.bottom - rc.top) : 0);
|
||||
wp->flags &= ~SWP_NOMOVE;
|
||||
return 0;
|
||||
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);
|
||||
wp->flags &= ~SWP_NOMOVE;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user