Browse Source

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

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

19
ExplorerPatcher/dllmain.c

@ -4257,15 +4257,20 @@ LRESULT CJupiterWindow_StaticCoreWindowSubclassProcHook(
FreeLibrary(hModule); FreeLibrary(hModule);
if (!dwStatus) if (!dwStatus)
{ {
BOOL bIsAtBottom = FALSE, bIsAtRight = FALSE;
POINT pt = GetDefaultWinXPosition(TRUE, &bIsAtBottom, &bIsAtRight);
RECT rc; RECT rc;
GetWindowRect(hWnd, &rc); GetWindowRect(hWnd, &rc);
LPWINDOWPOS wp = lParam; if (rc.top > 10) // this differentiates between the search
wp->x = pt.x - (bIsAtRight ? (rc.right - rc.left) : 0); // interface (Win+Q) and the search box in
wp->y = pt.y - (bIsAtBottom ? (rc.bottom - rc.top) : 0); // Explorer
wp->flags &= ~SWP_NOMOVE; {
return 0; 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…
Cancel
Save