From: Akihiro Sagawa sagawa.aki@gmail.com
Manual test shows minimal width of client area is 120px. --- dlls/mciqtz32/mciqtz.c | 9 ++++++--- dlls/winmm/tests/mci.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index cd86fbf0062..81a28b053da 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -183,9 +183,12 @@ static BOOL MCIQTZ_CreateWindow(WINE_MCIQTZ* wma, DWORD dwFlags, LPMCI_DGV_OPEN_ else if (FAILED(hr)) return FALSE;
- /* FIXME: Use video size here */ - width = 640; - height = 480; + /* Native always assumes an overlapped window + when calculating default video window size. */ + SetRect(&rc, 0, 0, max(120, width), height); + AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE); + width = rc.right - rc.left; + height = rc.bottom - rc.top;
wma->window = CreateWindowW(MCIQTZ_CLASS, lpParms->lpstrElementName, style, CW_USEDEFAULT, CW_USEDEFAULT, diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index c1a3ab184e1..f121e63991b 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -1597,7 +1597,7 @@ static void test_video_window(void)
GetWindowRect(video_window, &win_rc); OffsetRect(&rc, win_rc.left, win_rc.top); - todo_wine ok(EqualRect(&rc, &win_rc), "window rectangle doesn't match, expected %s, got %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&win_rc)); + ok(EqualRect(&rc, &win_rc), "window rectangle doesn't match, expected %s, got %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&win_rc));
err = mciSendCommandW(wDeviceID, MCI_WHERE, MCI_DGV_WHERE_WINDOW, (DWORD_PTR)&parm); ok(!err,"mciCommand where window returned %s\n", dbg_mcierr(err));