# HG changeset patch # User reimar # Date 1235425202 0 # Node ID c48f4a1835da44e02fee406be99499ab089f71a0 # Parent cd9aa9b2533ac0c90b0c2d57ea36a23ba0b894a1 Calculate border size in aspect keeping code by using AdjustWindowRect instead of GetClientRect and GetWindowRect since GetClientRect returns nonsensical values if Window is still minimized. diff -r cd9aa9b2533a -r c48f4a1835da libvo/w32_common.c --- a/libvo/w32_common.c Mon Feb 23 11:48:45 2009 +0000 +++ b/libvo/w32_common.c Mon Feb 23 21:40:02 2009 +0000 @@ -109,11 +109,12 @@ if (vo_keepaspect && !vo_fs) { WINDOWPOS *wpos = lParam; int xborder, yborder; - RECT r2; - GetClientRect(vo_window, &r); - GetWindowRect(vo_window, &r2); - xborder = (r2.right - r2.left) - (r.right - r.left); - yborder = (r2.bottom - r2.top) - (r.bottom - r.top); + r.left = r.top = 0; + r.right = wpos->cx; + r.bottom = wpos->cy; + AdjustWindowRect(&r, GetWindowLong(vo_window, GWL_STYLE), 0); + xborder = (r.right - r.left) - wpos->cx; + yborder = (r.bottom - r.top) - wpos->cy; wpos->cx -= xborder; wpos->cy -= yborder; aspect_fit(&wpos->cx, &wpos->cy, wpos->cx, wpos->cy); wpos->cx += xborder; wpos->cy += yborder;