On 7/31/22 06:53, Akihiro Sagawa wrote:
@@ -1573,6 +1575,37 @@ static void test_video_window(void) todo_wine_if(i != 3) ok(style == expected, "hwnd %p: got %#lx, expected %#lx\n", video_window, style, expected);
/* get source video size */
err = mciSendCommandW(wDeviceID, MCI_WHERE, MCI_DGV_WHERE_SOURCE, (DWORD_PTR)&parm);
ok(!err,"mciCommand where source returned %s\n", dbg_mcierr(err));
src_rc = parm.where.rc;
This should just be equal to the whole video rect (0,0)-(64,32) [unless, I suspect, it is set by MCI_DGV_PUT_SOURCE]; would you mind adding an explicit test for that?
/* test default video destination size */
err = mciSendCommandW(wDeviceID, MCI_WHERE, MCI_DGV_WHERE_DESTINATION, (DWORD_PTR)&parm);
ok(!err,"mciCommand where destination returned %s\n", dbg_mcierr(err));
if (style & (WS_POPUP|WS_CHILD))
rc = src_rc;
else
GetClientRect(video_window, &rc);
todo_wine_if(style & (WS_POPUP|WS_CHILD))
ok(EqualRect(&parm.where.rc, &rc), "got %s, expected %s\n", wine_dbgstr_rect(&parm.where.rc), wine_dbgstr_rect(&rc));
And this should too. The test here is a bit awkward as such because the destination and source rect are *always* equal, and separately, the client rect will also be equal to the video size if the window is a popup or child.
/* test default video window size */
rc = src_rc;
AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE); /* sigh */
OffsetRect(&rc, -rc.left, -rc.top);
rc.right = max(rc.right, GetSystemMetrics(SM_CXMIN));
I gather "sigh" here means "Windows is broken", in the way spelled out in 8/11, right? It wouldn't hurt to spell that out explicitly ;-)