From 76a628b8fafedb3b301aba03f4b21791d9222d4e Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Wed, 9 Jun 2021 17:16:16 +0200 Subject: [PATCH] even more tweaks to SetWindowPos and MoveWindow hooks --- src/winapi_hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index d0e8a26..e4346f8 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -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))