Commit 9cdc6812 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard
Browse files

mciqtz32: Reset the video size when changing video destination.



Signed-off-by: Akihiro Sagawa's avatarAkihiro Sagawa <sagawa.aki@gmail.com>
parent 23dabd57
......@@ -998,9 +998,18 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS
if (dwFlags & MCI_DGV_WINDOW_HWND && (IsWindow(lpParms->hWnd) || !lpParms->hWnd)) {
HWND hwnd = lpParms->hWnd ? lpParms->hWnd : wma->window;
TRACE("Setting parent window to %p.\n", hwnd);
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)hwnd);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)hwnd);
wma->parent = hwnd;
if (wma->parent != hwnd)
{
LONG width, height;
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)hwnd);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)hwnd);
IBasicVideo_GetVideoSize(wma->vidbasic, &width, &height);
IVideoWindow_SetWindowPosition(wma->vidwin, 0, 0, width, height);
wma->parent = hwnd;
}
}
if (dwFlags & MCI_DGV_WINDOW_STATE) {
TRACE("Setting nCmdShow to %d\n", lpParms->nCmdShow);
......
......@@ -1664,7 +1664,7 @@ static void test_video_window(void)
/* destination size is reset to the source video size */
err = mciSendCommandW(id, MCI_WHERE, MCI_DGV_WHERE_DESTINATION, (DWORD_PTR)&parm);
ok(!err, "Got %s.\n", dbg_mcierr(err));
todo_wine ok(EqualRect(&parm.where.rc, &src_rc), "Got destination rect %s, expected %s.\n",
ok(EqualRect(&parm.where.rc, &src_rc), "Got destination rect %s, expected %s.\n",
wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&src_rc));
/* destination size isn't reset unless the destination window is changed */
......@@ -1699,7 +1699,7 @@ static void test_video_window(void)
err = mciSendCommandW(id, MCI_WHERE, MCI_DGV_WHERE_DESTINATION, (DWORD_PTR)&parm);
ok(!err, "Got %s.\n", dbg_mcierr(err));
todo_wine ok(EqualRect(&parm.where.rc, &src_rc), "Got destination rect %s, expected %s.\n",
ok(EqualRect(&parm.where.rc, &src_rc), "Got destination rect %s, expected %s.\n",
wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&src_rc));
err = mciSendCommandW(id, MCI_CLOSE, 0, 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment