mciqtz32: Don't stretch video destination for a popup or child window.

This commit is contained in:
Akihiro Sagawa 2022-08-18 19:17:05 +09:00 committed by Alexandre Julliard
parent e28c2caac0
commit 04dc281207
2 changed files with 10 additions and 6 deletions

View file

@ -211,9 +211,14 @@ static bool create_window(WINE_MCIQTZ *wma, DWORD flags, const MCI_DGV_OPEN_PARM
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)wma->window);
IVideoWindow_put_WindowStyle(wma->vidwin, WS_CHILD); /* reset window style */
GetClientRect(wma->window, &rc);
width = rc.right;
height = rc.bottom;
if (style & (WS_POPUP | WS_CHILD))
IBasicVideo_GetVideoSize(wma->vidbasic, &width, &height);
else
{
GetClientRect(wma->window, &rc);
width = rc.right;
height = rc.bottom;
}
IVideoWindow_SetWindowPosition(wma->vidwin, 0, 0, width, height);
IVideoWindow_put_Visible(wma->vidwin, OATRUE);

View file

@ -1603,9 +1603,8 @@ static void test_video_window(void)
* in particular if the video width is less than SM_CXMIN. */
GetClientRect(video_window, &rc);
todo_wine_if (style & (WS_POPUP | WS_CHILD))
ok(EqualRect(&parm.where.rc, &rc), "Got destination rect %s, expected %s.\n",
wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&rc));
ok(EqualRect(&parm.where.rc, &rc), "Got destination rect %s, expected %s.\n",
wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&rc));
/* Test the default video window size. */
rc = src_rc;