From: Akihiro Sagawa sagawa.aki@gmail.com
--- dlls/mciqtz32/mciqtz.c | 11 ++++++++--- dlls/winmm/tests/mci.c | 5 ++--- 2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index ee130b078d5..abbbbc07547 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -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); diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index a529b3080d2..ba810f6f096 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -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;