diff --git a/windows/winpos.c b/windows/winpos.c index be0a7fb05b5..f479c303847 100644 --- a/windows/winpos.c +++ b/windows/winpos.c @@ -744,7 +744,7 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos, if ((style & WS_CAPTION) == WS_CAPTION) style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ - GetClientRect(GetParent(hwnd), &rc); + GetClientRect(GetAncestor(hwnd,GA_PARENT), &rc); AdjustWindowRectEx(&rc, style, 0, exstyle); /* avoid calculating this twice */