From: Akihiro Sagawa sagawa.aki@gmail.com
--- dlls/mciqtz32/mciqtz.c | 6 ++++++ dlls/winmm/tests/mci.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index 81a28b053da..5b4365615d1 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -996,9 +996,15 @@ 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; + LONG width, height; + TRACE("Setting hWnd to %p\n", lpParms->hWnd); 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) { diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index f121e63991b..a0ff0428bad 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -1639,7 +1639,7 @@ static void test_video_window(void) /* destination size is reset to the source video size */ err = mciSendCommandW(wDeviceID, MCI_WHERE, MCI_DGV_WHERE_DESTINATION, (DWORD_PTR)&parm); ok(!err,"mciCommand where destination returned %s\n", dbg_mcierr(err)); - todo_wine ok(EqualRect(&parm.where.rc, &src_rc), "got %s, expected %s\n", wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&src_rc)); + ok(EqualRect(&parm.where.rc, &src_rc), "got %s, expected %s\n", wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&src_rc));
/* destination size isn't reset if the destination window doesn't change */ SetRect(&rc, 0, 0, src_rc.right * 2, src_rc.bottom / 2); @@ -1672,7 +1672,7 @@ static void test_video_window(void)
err = mciSendCommandW(wDeviceID, MCI_WHERE, MCI_DGV_WHERE_DESTINATION, (DWORD_PTR)&parm); ok(!err,"mciCommand where destination returned %s\n", dbg_mcierr(err)); - todo_wine ok(EqualRect(&parm.where.rc, &src_rc), "got %s, expected %s\n", wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&src_rc)); + ok(EqualRect(&parm.where.rc, &src_rc), "got %s, expected %s\n", wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&src_rc));
err = mciSendCommandW(wDeviceID, MCI_CLOSE, 0, 0); ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err));