1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

even more tweaks to SetWindowPos and MoveWindow hooks

This commit is contained in:
FunkyFr3sh 2021-06-09 17:16:16 +02:00
parent 76ddccd3a3
commit 76a628b8fa

View File

@ -260,7 +260,7 @@ BOOL WINAPI fake_SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int
if ((uFlags & req_flags) != req_flags)
return TRUE;
}
else if (!IsChild(g_ddraw->hwnd, hWnd) && GetAncestor(hWnd, GA_ROOTOWNER) == g_ddraw->hwnd)
else if (!(GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD))
{
POINT pt = { 0, 0 };
if (real_ClientToScreen(g_ddraw->hwnd, &pt))
@ -282,7 +282,7 @@ BOOL WINAPI fake_MoveWindow(HWND hWnd, int X, int Y, int nWidth, int nHeight, BO
{
return TRUE;
}
else if (!IsChild(g_ddraw->hwnd, hWnd) && GetAncestor(hWnd, GA_ROOTOWNER) == g_ddraw->hwnd)
else if (!(GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD))
{
POINT pt = { 0, 0 };
if (real_ClientToScreen(g_ddraw->hwnd, &pt))