-- v2: mciqtz32: Update parent window's title instead of the video window's one. mciqtz32: Update parent window's state instead of the video window's one. winmm/tests: Add more window command tests. mciqtz32: Implement MCI_DGV_STATUS_HWND. winmm/tests: Add basic video window tests. mciqtz32: Simplify video window management by creating default window.
From: Akihiro Sagawa sagawa.aki@gmail.com
Now the video window by IVideoWindow always has WS_CHILD style regardless open parameters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52448 Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com --- dlls/mciqtz32/mciqtz.c | 162 +++++++++++++++++++++++++-------- dlls/mciqtz32/mciqtz_private.h | 1 + 2 files changed, 127 insertions(+), 36 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index a7ec0b78f33..92622d848a9 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -31,8 +31,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(mciqtz);
+#define MCIQTZ_CLASS L"MCIQTZ_Window" + static DWORD MCIQTZ_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS); static DWORD MCIQTZ_mciStop(UINT, DWORD, LPMCI_GENERIC_PARMS); +static DWORD MCIQTZ_mciPause(UINT, DWORD, LPMCI_GENERIC_PARMS);
/*======================================================================* * MCI QTZ implementation * @@ -68,6 +71,62 @@ static WINE_MCIQTZ* MCIQTZ_mciGetOpenDev(UINT wDevID) return wma; }
+static LRESULT WINAPI MCIQTZ_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + TRACE("hwnd=%p msg=%x wparam=%Ix lparam=%Ix\n", hWnd, uMsg, wParam, lParam); + + switch (uMsg) { + case WM_CREATE: + { + LPARAM wDevId = (LPARAM)((CREATESTRUCTW *)lParam)->lpCreateParams; + SetWindowLongW(hWnd, 0, wDevId); + return DefWindowProcW(hWnd, uMsg, wParam, lParam); + } + + case WM_CLOSE: + { + MCIQTZ_mciPause(GetWindowLongW(hWnd, 0), MCI_WAIT, NULL); + ShowWindow(hWnd, SW_HIDE); + return 0; + } + + case WM_ERASEBKGND: + { + RECT rect; + GetClientRect(hWnd, &rect); + FillRect((HDC)wParam, &rect, GetStockObject(BLACK_BRUSH)); + return 1; + } + + default: + return DefWindowProcW(hWnd, uMsg, wParam, lParam); + } +} + +static BOOL MCIQTZ_UnregisterClass(void) +{ + return UnregisterClassW(MCIQTZ_CLASS, MCIQTZ_hInstance); +} + +static BOOL MCIQTZ_RegisterClass(void) +{ + WNDCLASSW wndClass; + + ZeroMemory(&wndClass, sizeof(WNDCLASSW)); + wndClass.style = CS_DBLCLKS; + wndClass.lpfnWndProc = MCIQTZ_WindowProc; + wndClass.cbWndExtra = sizeof(MCIDEVICEID); + wndClass.hInstance = MCIQTZ_hInstance; + wndClass.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW); + wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); + wndClass.lpszClassName = MCIQTZ_CLASS; + + if (RegisterClassW(&wndClass)) return TRUE; + if (GetLastError() == ERROR_CLASS_ALREADY_EXISTS) return TRUE; + + return FALSE; +} + /************************************************************************** * MCIQTZ_drvOpen [internal] */ @@ -81,6 +140,8 @@ static DWORD MCIQTZ_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp) if (!modp) return 0xFFFFFFFF;
+ if (!MCIQTZ_RegisterClass()) return 0; + wma = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIQTZ)); if (!wma) return 0; @@ -109,6 +170,7 @@ static DWORD MCIQTZ_drvClose(DWORD dwDevID) /* finish all outstanding things */ MCIQTZ_mciClose(dwDevID, MCI_WAIT, NULL);
+ MCIQTZ_UnregisterClass(); mciFreeCommandResource(wma->command_table); mciSetDriverData(dwDevID, 0); CloseHandle(wma->stop_event); @@ -139,6 +201,54 @@ static DWORD MCIQTZ_drvConfigure(DWORD dwDevID) return 1; }
+static BOOL MCIQTZ_CreateWindow(WINE_MCIQTZ* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpParms) +{ + HWND hParent = NULL; + DWORD dwStyle = (WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS) & ~WS_MAXIMIZEBOX; + RECT rc; + HRESULT hr; + + /* what should be done ? */ + if (wma->window) return TRUE; + + if (dwFlags & MCI_DGV_OPEN_PARENT) hParent = lpParms->hWndParent; + if (dwFlags & MCI_DGV_OPEN_WS) dwStyle = lpParms->dwStyle; + + dwStyle &= ~WS_VISIBLE; + + rc.left = rc.top = 0; + hr = IBasicVideo_GetVideoSize(wma->vidbasic, &rc.right, &rc.bottom); + if (FAILED(hr)) return hr == E_NOINTERFACE; /* no video renderer ? */ + + AdjustWindowRect(&rc, dwStyle, FALSE); + if (!(dwStyle & (WS_CHILD|WS_POPUP))) /* overlapped window ? */ + { + rc.right -= rc.left; + rc.bottom -= rc.top; + rc.left = rc.top = CW_USEDEFAULT; + } + + wma->window = CreateWindowW(MCIQTZ_CLASS, lpParms->lpstrElementName, dwStyle, + rc.left, rc.top, rc.right, rc.bottom, + hParent, 0, MCIQTZ_hInstance, + ULongToPtr(wma->wDevID)); + + TRACE("(%04x, %08lX, %p, style %lx, parent %p, dimensions %ldx%ld, window %p)\n", wma->wDevID, + dwFlags, lpParms, dwStyle, hParent, rc.right - (rc.left == CW_USEDEFAULT ? 0 : rc.left), rc.bottom - (rc.top == CW_USEDEFAULT ? 0 : rc.top), wma->window); + + if (!wma->window) + return FALSE; + + wma->parent = wma->window; + IVideoWindow_put_AutoShow(wma->vidwin, OAFALSE); + IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)wma->parent); + IVideoWindow_put_WindowStyle(wma->vidwin, WS_CHILD); + IVideoWindow_put_Owner(wma->vidwin, (OAHWND)wma->parent); + IVideoWindow_put_Visible(wma->vidwin, OATRUE); + + return TRUE; +} + /************************************************************************** * MCIQTZ_mciNotify [internal] * @@ -161,8 +271,6 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags, { WINE_MCIQTZ* wma; HRESULT hr; - DWORD style = 0; - RECT rc = { 0, 0, 0, 0 };
TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpOpenParms);
@@ -238,22 +346,7 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags, goto err; }
- IVideoWindow_put_AutoShow(wma->vidwin, OAFALSE); - IVideoWindow_put_Visible(wma->vidwin, OAFALSE); - if (dwFlags & MCI_DGV_OPEN_WS) - style = lpOpenParms->dwStyle; - if (dwFlags & MCI_DGV_OPEN_PARENT) { - IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpOpenParms->hWndParent); - IVideoWindow_put_WindowState(wma->vidwin, SW_HIDE); - IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD); - IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpOpenParms->hWndParent); - GetClientRect(lpOpenParms->hWndParent, &rc); - IVideoWindow_SetWindowPosition(wma->vidwin, rc.left, rc.top, rc.right - rc.top, rc.bottom - rc.top); - wma->parent = (HWND)lpOpenParms->hWndParent; - } - else if (style) - IVideoWindow_put_WindowStyle(wma->vidwin, style); - IBasicVideo_GetVideoSize(wma->vidbasic, &rc.right, &rc.bottom); + MCIQTZ_CreateWindow(wma, dwFlags, lpOpenParms); wma->opened = TRUE;
if (dwFlags & MCI_NOTIFY) @@ -307,6 +400,13 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL);
if (wma->opened) { + if (wma->window) + { + IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)NULL); + IVideoWindow_put_Owner(wma->vidwin, (OAHWND)NULL); + DestroyWindow(wma->window); + wma->window = NULL; + } IVideoWindow_Release(wma->vidwin); IBasicVideo_Release(wma->vidbasic); IBasicAudio_Release(wma->audio); @@ -447,7 +547,8 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms return MCIERR_INTERNAL; }
- IVideoWindow_put_Visible(wma->vidwin, OATRUE); + if (wma->parent) + ShowWindow(wma->parent, SW_SHOW);
wma->thread = CreateThread(NULL, 0, MCIQTZ_notifyThread, wma, 0, NULL); if (!wma->thread) { @@ -525,9 +626,6 @@ static DWORD MCIQTZ_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa wma->thread = NULL; }
- if (!wma->parent) - IVideoWindow_put_Visible(wma->vidwin, OAFALSE); - return 0; }
@@ -574,6 +672,9 @@ static DWORD MCIQTZ_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lp return MCIERR_INTERNAL; }
+ if (wma->parent) + ShowWindow(wma->parent, SW_SHOW); + return 0; }
@@ -919,21 +1020,10 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS return 0;
if (dwFlags & MCI_DGV_WINDOW_HWND && (IsWindow(lpParms->hWnd) || !lpParms->hWnd)) { - LONG visible = OATRUE; - LONG style = 0; TRACE("Setting hWnd to %p\n", lpParms->hWnd); - IVideoWindow_get_Visible(wma->vidwin, &visible); - IVideoWindow_put_Visible(wma->vidwin, OAFALSE); - IVideoWindow_get_WindowStyle(wma->vidwin, &style); - style &= ~WS_CHILD; - if (lpParms->hWnd) - IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD); - else - IVideoWindow_put_WindowStyle(wma->vidwin, style); - IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpParms->hWnd); - IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpParms->hWnd); - IVideoWindow_put_Visible(wma->vidwin, visible); - wma->parent = lpParms->hWnd; + wma->parent = lpParms->hWnd ? lpParms->hWnd : wma->window; + IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)wma->parent); + IVideoWindow_put_Owner(wma->vidwin, (OAHWND)wma->parent); } if (dwFlags & MCI_DGV_WINDOW_STATE) { TRACE("Setting nCmdShow to %d\n", lpParms->nCmdShow); diff --git a/dlls/mciqtz32/mciqtz_private.h b/dlls/mciqtz32/mciqtz_private.h index aa6fad99326..9206a88b3fa 100644 --- a/dlls/mciqtz32/mciqtz_private.h +++ b/dlls/mciqtz32/mciqtz_private.h @@ -42,6 +42,7 @@ typedef struct { REFERENCE_TIME seek_stop; UINT command_table; HWND parent; + HWND window; MCIDEVICEID notify_devid; HANDLE callback; HANDLE thread;
On 7/5/22 06:34, Akihiro Sagawa wrote:
From: Akihiro Sagawa sagawa.aki@gmail.com
Now the video window by IVideoWindow always has WS_CHILD style regardless open parameters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52448 Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com
What's being simplified, exactly? As far as I can tell we're changing our behaviour to be more correct, but it's certainly not getting simpler.
dlls/mciqtz32/mciqtz.c | 162 +++++++++++++++++++++++++-------- dlls/mciqtz32/mciqtz_private.h | 1 + 2 files changed, 127 insertions(+), 36 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index a7ec0b78f33..92622d848a9 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -31,8 +31,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(mciqtz);
+#define MCIQTZ_CLASS L"MCIQTZ_Window"
There's no need for this to be a macro, right? In that case I think it should be a "static const WCHAR []" string instead.
- static DWORD MCIQTZ_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS); static DWORD MCIQTZ_mciStop(UINT, DWORD, LPMCI_GENERIC_PARMS);
+static DWORD MCIQTZ_mciPause(UINT, DWORD, LPMCI_GENERIC_PARMS);
/*======================================================================*
MCI QTZ implementation *
@@ -68,6 +71,62 @@ static WINE_MCIQTZ* MCIQTZ_mciGetOpenDev(UINT wDevID) return wma; }
+static LRESULT WINAPI MCIQTZ_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{
- TRACE("hwnd=%p msg=%x wparam=%Ix lparam=%Ix\n", hWnd, uMsg, wParam, lParam);
Please trace hexadecimal parameters with #.
- switch (uMsg) {
- case WM_CREATE:
- {
LPARAM wDevId = (LPARAM)((CREATESTRUCTW *)lParam)->lpCreateParams;
SetWindowLongW(hWnd, 0, wDevId);
return DefWindowProcW(hWnd, uMsg, wParam, lParam);
Perhaps "break" and move the DefWindowProc() call out of the switch?
- }
- case WM_CLOSE:
- {
MCIQTZ_mciPause(GetWindowLongW(hWnd, 0), MCI_WAIT, NULL);
ShowWindow(hWnd, SW_HIDE);
return 0;
- }
It seems probably easy enough to test this in winmm, but even failing that, manual tests would be nice.
- case WM_ERASEBKGND:
- {
RECT rect;
GetClientRect(hWnd, &rect);
FillRect((HDC)wParam, &rect, GetStockObject(BLACK_BRUSH));
return 1;
- }
Why this instead of setting the background brush to black?
- default:
return DefWindowProcW(hWnd, uMsg, wParam, lParam);
- }
+}
+static BOOL MCIQTZ_UnregisterClass(void) +{
- return UnregisterClassW(MCIQTZ_CLASS, MCIQTZ_hInstance);
+}
+static BOOL MCIQTZ_RegisterClass(void) +{
- WNDCLASSW wndClass;
- ZeroMemory(&wndClass, sizeof(WNDCLASSW));
- wndClass.style = CS_DBLCLKS;
Why CS_DBLCLKS? We're not using it.
- wndClass.lpfnWndProc = MCIQTZ_WindowProc;
- wndClass.cbWndExtra = sizeof(MCIDEVICEID);
- wndClass.hInstance = MCIQTZ_hInstance;
- wndClass.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW);
- wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
- wndClass.lpszClassName = MCIQTZ_CLASS;
- if (RegisterClassW(&wndClass)) return TRUE;
- if (GetLastError() == ERROR_CLASS_ALREADY_EXISTS) return TRUE;
- return FALSE;
+}
- /**************************************************************************
*/
MCIQTZ_drvOpen [internal]
@@ -81,6 +140,8 @@ static DWORD MCIQTZ_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp) if (!modp) return 0xFFFFFFFF;
- if (!MCIQTZ_RegisterClass()) return 0;
wma = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIQTZ)); if (!wma) return 0;
@@ -109,6 +170,7 @@ static DWORD MCIQTZ_drvClose(DWORD dwDevID) /* finish all outstanding things */ MCIQTZ_mciClose(dwDevID, MCI_WAIT, NULL);
MCIQTZ_UnregisterClass(); mciFreeCommandResource(wma->command_table); mciSetDriverData(dwDevID, 0); CloseHandle(wma->stop_event);
@@ -139,6 +201,54 @@ static DWORD MCIQTZ_drvConfigure(DWORD dwDevID) return 1; }
+static BOOL MCIQTZ_CreateWindow(WINE_MCIQTZ* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpParms) +{
- HWND hParent = NULL;
- DWORD dwStyle = (WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS) & ~WS_MAXIMIZEBOX;
- RECT rc;
- HRESULT hr;
- /* what should be done ? */
- if (wma->window) return TRUE;
What should be done?
- if (dwFlags & MCI_DGV_OPEN_PARENT) hParent = lpParms->hWndParent;
- if (dwFlags & MCI_DGV_OPEN_WS) dwStyle = lpParms->dwStyle;
- dwStyle &= ~WS_VISIBLE;
- rc.left = rc.top = 0;
- hr = IBasicVideo_GetVideoSize(wma->vidbasic, &rc.right, &rc.bottom);
- if (FAILED(hr)) return hr == E_NOINTERFACE; /* no video renderer ? */
When can that happen?
- AdjustWindowRect(&rc, dwStyle, FALSE);
- if (!(dwStyle & (WS_CHILD|WS_POPUP))) /* overlapped window ? */
Where is this logic coming from? Do you have tests?
This also loses the previous logic that uses GetClientRect() on the parent. That might be correct, but it lacks tests, and it should probably be done in a separate patch.
- {
rc.right -= rc.left;
rc.bottom -= rc.top;
Aren't "left" and "top" zero?
It seems like it'd be less confusing in general to use separate width/height (or x/y) variables instead of passing rc.right and rc.bottom directly to AdjustWindow.
rc.left = rc.top = CW_USEDEFAULT;
- }
- wma->window = CreateWindowW(MCIQTZ_CLASS, lpParms->lpstrElementName, dwStyle,
rc.left, rc.top, rc.right, rc.bottom,
hParent, 0, MCIQTZ_hInstance,
ULongToPtr(wma->wDevID));
- TRACE("(%04x, %08lX, %p, style %lx, parent %p, dimensions %ldx%ld, window %p)\n", wma->wDevID,
dwFlags, lpParms, dwStyle, hParent, rc.right - (rc.left == CW_USEDEFAULT ? 0 : rc.left), rc.bottom - (rc.top == CW_USEDEFAULT ? 0 : rc.top), wma->window);
- if (!wma->window)
return FALSE;
- wma->parent = wma->window;
- IVideoWindow_put_AutoShow(wma->vidwin, OAFALSE);
- IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)wma->parent);
- IVideoWindow_put_WindowStyle(wma->vidwin, WS_CHILD);
put_Owner() automatically sets WS_CHILD.
- IVideoWindow_put_Owner(wma->vidwin, (OAHWND)wma->parent);
- IVideoWindow_put_Visible(wma->vidwin, OATRUE);
- return TRUE;
+}
- /**************************************************************************
MCIQTZ_mciNotify [internal]
@@ -161,8 +271,6 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags, { WINE_MCIQTZ* wma; HRESULT hr;
DWORD style = 0;
RECT rc = { 0, 0, 0, 0 };
TRACE("(%04x, %08lX, %p)\n", wDevID, dwFlags, lpOpenParms);
@@ -238,22 +346,7 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags, goto err; }
- IVideoWindow_put_AutoShow(wma->vidwin, OAFALSE);
- IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
- if (dwFlags & MCI_DGV_OPEN_WS)
style = lpOpenParms->dwStyle;
- if (dwFlags & MCI_DGV_OPEN_PARENT) {
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpOpenParms->hWndParent);
IVideoWindow_put_WindowState(wma->vidwin, SW_HIDE);
IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpOpenParms->hWndParent);
GetClientRect(lpOpenParms->hWndParent, &rc);
IVideoWindow_SetWindowPosition(wma->vidwin, rc.left, rc.top, rc.right - rc.top, rc.bottom - rc.top);
wma->parent = (HWND)lpOpenParms->hWndParent;
- }
- else if (style)
IVideoWindow_put_WindowStyle(wma->vidwin, style);
- IBasicVideo_GetVideoSize(wma->vidbasic, &rc.right, &rc.bottom);
- MCIQTZ_CreateWindow(wma, dwFlags, lpOpenParms);
This ignores the return value.
wma->opened = TRUE; if (dwFlags & MCI_NOTIFY)
@@ -307,6 +400,13 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL);
if (wma->opened) {
if (wma->window)
Assuming we were to check for failure in MCIQTZ_mciOpen(), which I imgaine we should do, can this happen?
There are other similar cases below.
{
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)NULL);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)NULL);
DestroyWindow(wma->window);
wma->window = NULL;
} IVideoWindow_Release(wma->vidwin); IBasicVideo_Release(wma->vidbasic); IBasicAudio_Release(wma->audio);
@@ -447,7 +547,8 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms return MCIERR_INTERNAL; }
- IVideoWindow_put_Visible(wma->vidwin, OATRUE);
if (wma->parent)
ShowWindow(wma->parent, SW_SHOW); wma->thread = CreateThread(NULL, 0, MCIQTZ_notifyThread, wma, 0, NULL); if (!wma->thread) {
@@ -525,9 +626,6 @@ static DWORD MCIQTZ_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa wma->thread = NULL; }
- if (!wma->parent)
IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
The tests bear this out, but it's also a change in behaviour that seems outside the scope of this patch.
return 0;
}
@@ -574,6 +672,9 @@ static DWORD MCIQTZ_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lp return MCIERR_INTERNAL; }
- if (wma->parent)
ShowWindow(wma->parent, SW_SHOW);
This doesn't have tests, and it also seems outside the scope of this patch.
return 0;
}
@@ -919,21 +1020,10 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS return 0;
if (dwFlags & MCI_DGV_WINDOW_HWND && (IsWindow(lpParms->hWnd) || !lpParms->hWnd)) {
LONG visible = OATRUE;
LONG style = 0; TRACE("Setting hWnd to %p\n", lpParms->hWnd);
IVideoWindow_get_Visible(wma->vidwin, &visible);
IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
IVideoWindow_get_WindowStyle(wma->vidwin, &style);
style &= ~WS_CHILD;
if (lpParms->hWnd)
IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD);
else
IVideoWindow_put_WindowStyle(wma->vidwin, style);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpParms->hWnd);
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpParms->hWnd);
IVideoWindow_put_Visible(wma->vidwin, visible);
wma->parent = lpParms->hWnd;
wma->parent = lpParms->hWnd ? lpParms->hWnd : wma->window;
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)wma->parent);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)wma->parent); }
Should we also hide "wma->window" here?
if (dwFlags & MCI_DGV_WINDOW_STATE) { TRACE("Setting nCmdShow to %d\n", lpParms->nCmdShow);
On Thu, 7 Jul 2022 14:19:02 -0500, Zebediah Figura wrote:
On 7/5/22 06:34, Akihiro Sagawa wrote:
From: Akihiro Sagawa sagawa.aki@gmail.com
Now the video window by IVideoWindow always has WS_CHILD style regardless open parameters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52448 Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com
What's being simplified, exactly? As far as I can tell we're changing our behaviour to be more correct, but it's certainly not getting simpler.
You're right. It's not so simple... I'll rename it.
[...]
- }
- case WM_CLOSE:
- {
MCIQTZ_mciPause(GetWindowLongW(hWnd, 0), MCI_WAIT, NULL);
ShowWindow(hWnd, SW_HIDE);
return 0;
- }
It seems probably easy enough to test this in winmm, but even failing that, manual tests would be nice.
I'll do.
- case WM_ERASEBKGND:
- {
RECT rect;
GetClientRect(hWnd, &rect);
FillRect((HDC)wParam, &rect, GetStockObject(BLACK_BRUSH));
return 1;
- }
Why this instead of setting the background brush to black?
That's good idea. However, manual test shows it's unnecessary. I'll get rid of this block in revised versoin.
[...]
- if (dwFlags & MCI_DGV_OPEN_PARENT) hParent = lpParms->hWndParent;
- if (dwFlags & MCI_DGV_OPEN_WS) dwStyle = lpParms->dwStyle;
- dwStyle &= ~WS_VISIBLE;
- rc.left = rc.top = 0;
- hr = IBasicVideo_GetVideoSize(wma->vidbasic, &rc.right, &rc.bottom);
- if (FAILED(hr)) return hr == E_NOINTERFACE; /* no video renderer ? */
When can that happen?
MCIQTZ driver can also handle an audio file, such as an MP3 file. I'd like to return early for the case.
- AdjustWindowRect(&rc, dwStyle, FALSE);
- if (!(dwStyle & (WS_CHILD|WS_POPUP))) /* overlapped window ? */
Where is this logic coming from? Do you have tests? This also loses the previous logic that uses GetClientRect() on the parent. That might be correct, but it lacks tests, and it should probably be done in a separate patch.
This logic, MCIQTZ_CreateWindow and MCIQTZ_WindowProc mostly come from dlls/mciavi32/wnd.c. Some of them arn't applicable to MCIQTZ. I'll add some tests regarding window dimensions.
- {
rc.right -= rc.left;
rc.bottom -= rc.top;
Aren't "left" and "top" zero?
No, AdjustWindowRect() makes them negative numbers. For instance, SetRect(&rc, 0, 0, 640, 480); AdjustWindowRect(&rc, WS_OVERLAPPEDWINDOW, FALSE); It'll show, rc.left: -3 and rc.top: -22. Of course, these values are varies caption bar height, etc.
It seems like it'd be less confusing in general to use separate width/height (or x/y) variables instead of passing rc.right and rc.bottom directly to AdjustWindow.
Right.
[...]
- wma->parent = wma->window;
- IVideoWindow_put_AutoShow(wma->vidwin, OAFALSE);
- IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)wma->parent);
- IVideoWindow_put_WindowStyle(wma->vidwin, WS_CHILD);
put_Owner() automatically sets WS_CHILD.
Yes, but the main point of this call is resetting the window style. Otherwise, video renderer window inherits the former, overlapped window style, e.g. WS_CAPTION.
- IVideoWindow_put_Owner(wma->vidwin, (OAHWND)wma->parent);
- IVideoWindow_put_Visible(wma->vidwin, OATRUE);
- return TRUE;
+}
[...]
@@ -307,6 +400,13 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL);
if (wma->opened) {
if (wma->window)
Assuming we were to check for failure in MCIQTZ_mciOpen(), which I imgaine we should do, can this happen?
There are other similar cases below.
Again, MCIQTZ can open audio files. In that case, wma->window will be NULL.
{
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)NULL);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)NULL);
DestroyWindow(wma->window);
wma->window = NULL;
} IVideoWindow_Release(wma->vidwin); IBasicVideo_Release(wma->vidbasic); IBasicAudio_Release(wma->audio);
[...]
@@ -525,9 +626,6 @@ static DWORD MCIQTZ_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa wma->thread = NULL; }
- if (!wma->parent)
IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
The tests bear this out, but it's also a change in behaviour that seems outside the scope of this patch.
Indeed. I'll add test and patch for this point before this patch.
return 0;
}
@@ -574,6 +672,9 @@ static DWORD MCIQTZ_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lp
return MCIERR_INTERNAL; }
- if (wma->parent)
ShowWindow(wma->parent, SW_SHOW);
This doesn't have tests, and it also seems outside the scope of this patch.
Sure. I'll split this change into another patch.
return 0;
}
@@ -919,21 +1020,10 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS
return 0;
if (dwFlags & MCI_DGV_WINDOW_HWND && (IsWindow(lpParms->hWnd) || !lpParms->hWnd)) {
LONG visible = OATRUE;
LONG style = 0; TRACE("Setting hWnd to %p\n", lpParms->hWnd);
IVideoWindow_get_Visible(wma->vidwin, &visible);
IVideoWindow_put_Visible(wma->vidwin, OAFALSE);
IVideoWindow_get_WindowStyle(wma->vidwin, &style);
style &= ~WS_CHILD;
if (lpParms->hWnd)
IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD);
else
IVideoWindow_put_WindowStyle(wma->vidwin, style);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpParms->hWnd);
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpParms->hWnd);
IVideoWindow_put_Visible(wma->vidwin, visible);
wma->parent = lpParms->hWnd;
wma->parent = lpParms->hWnd ? lpParms->hWnd : wma->window;
IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)wma->parent);
IVideoWindow_put_Owner(wma->vidwin, (OAHWND)wma->parent); }
Should we also hide "wma->window" here?
Good catch. We need tests at this point.
Thanks for reviewing and feedbacks. I'll send updated patch soon. Sorry for the delay in replying due to trial and error.
Akihiro Sagawa
From: Akihiro Sagawa sagawa.aki@gmail.com
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com --- dlls/winmm/tests/Makefile.in | 3 ++ dlls/winmm/tests/mci.c | 75 +++++++++++++++++++++++++++++++++++ dlls/winmm/tests/rsrc.rc | 25 ++++++++++++ dlls/winmm/tests/test.mpg | Bin 0 -> 12288 bytes 4 files changed, 103 insertions(+) create mode 100644 dlls/winmm/tests/rsrc.rc create mode 100644 dlls/winmm/tests/test.mpg
diff --git a/dlls/winmm/tests/Makefile.in b/dlls/winmm/tests/Makefile.in index 1b191cb5747..2b475dd89c3 100644 --- a/dlls/winmm/tests/Makefile.in +++ b/dlls/winmm/tests/Makefile.in @@ -12,3 +12,6 @@ C_SRCS = \ mmio.c \ timer.c \ wave.c + +RC_SRCS = \ + rsrc.rc diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index cfad9a77da8..9399a0fd284 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -23,6 +23,7 @@ #include "windows.h" #include "mmsystem.h" #include "mmreg.h" +#include "digitalv.h" #include "wine/test.h"
/* The tests use the MCI's own save capability to create the tempfile.wav to play. @@ -37,6 +38,7 @@ typedef union { MCI_GETDEVCAPS_PARMS caps; MCI_SYSINFO_PARMSA sys; MCI_SEEK_PARMS seek; + MCI_DGV_OPEN_PARMSW dgv_open; MCI_GENERIC_PARMS gen; } MCI_PARMS_UNION;
@@ -139,6 +141,31 @@ static BOOL spurious_message(LPMSG msg) return FALSE; }
+static WCHAR *load_resource(const WCHAR *name) +{ + static WCHAR pathW[MAX_PATH]; + DWORD written; + HANDLE file; + HRSRC res; + void *ptr; + + GetTempPathW(ARRAY_SIZE(pathW), pathW); + wcscat(pathW, name); + + file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); + ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %lu.\n", + wine_dbgstr_w(pathW), GetLastError()); + + res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA); + ok(!!res, "Failed to load resource, error %lu.\n", GetLastError()); + ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res)); + WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL); + ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource.\n"); + CloseHandle(file); + + return pathW; +} + /* A single ok() in each code path allows us to prefix this with todo_wine */ #define test_notification(hwnd, command, type) test_notification_dbg(hwnd, command, type, __LINE__) static void test_notification_dbg(HWND hwnd, const char* command, WPARAM type, int line) @@ -1426,6 +1453,51 @@ static void test_threads(void) ok(mr == 0, "close gave: 0x%lx\n", mr); }
+static void test_video_window(HWND hwnd) +{ + const WCHAR *filename = load_resource(L"test.mpg"); + MCI_PARMS_UNION parm; + MCIERROR err; + HWND video_window, parent; + MCIDEVICEID wDeviceID; + DWORD style, expected; + BOOL ret; + + parm.dgv_open.lpstrDeviceType = (WCHAR *)L"MPEGVideo"; + parm.dgv_open.lpstrElementName = (WCHAR *)filename; + parm.dgv_open.hWndParent = hwnd; + err = mciSendCommandW(0, MCI_OPEN, + MCI_OPEN_ELEMENT | MCI_OPEN_TYPE | MCI_DGV_OPEN_PARENT, + (DWORD_PTR)&parm); + ok(!err,"mciCommand open test.mpg type MPEGVideo returned %s\n", dbg_mcierr(err)); + wDeviceID = parm.dgv_open.wDeviceID; + + parm.status.dwItem = MCI_DGV_STATUS_HWND; + parm.status.dwReturn = 0xdeadbeef; + err = mciSendCommandW(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm); + todo_wine ok(!err,"mciCommand status hwnd returned %s\n", dbg_mcierr(err)); + if (err) + { + skip("MCI_DGV_STATUS_HWND got an error\n"); + goto close; + } + video_window = (HWND)parm.status.dwReturn; + + ok(IsWindow(video_window), "video window %p doesn't exist.\n", video_window); + parent = GetWindow(video_window, GW_OWNER); + ok(hwnd == parent, "expected owner %p, got %p\n", hwnd, parent); + style = GetWindowLongW(video_window, GWL_STYLE); + expected = (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW) & ~WS_MAXIMIZEBOX; + ok(style == expected, "expected style %08lx, got %08lx\n", expected, style); + +close: + err = mciSendCommandW(wDeviceID, MCI_CLOSE, 0, 0); + ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err)); + + ret = DeleteFileW(filename); + ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError()); +} + START_TEST(mci) { char curdir[MAX_PATH], tmpdir[MAX_PATH]; @@ -1450,6 +1522,9 @@ START_TEST(mci) test_asyncWaveTypeMpegvideo(hwnd); }else skip("No output devices available, skipping all output tests\n"); + + test_video_window(hwnd); + /* Win9X hangs when exiting with something still open. */ err = mciSendStringA("close all", NULL, 0, hwnd); ok(!err,"final close all returned %s\n", dbg_mcierr(err)); diff --git a/dlls/winmm/tests/rsrc.rc b/dlls/winmm/tests/rsrc.rc new file mode 100644 index 00000000000..b5fde1c39ba --- /dev/null +++ b/dlls/winmm/tests/rsrc.rc @@ -0,0 +1,25 @@ +/* + * Resource file for mci tests. + * + * Copyright 2022 Akihiro Sagawa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "windef.h" + +/* ffmpeg -f lavfi -i smptebars -f lavfi -i "sine=frequency=1000" -t 0.16 -r 25 -f mpeg -vcodec mpeg1video -vf scale=32x24 -acodec mp2 test.mpg */ +/* @makedep: test.mpg */ +test.mpg RCDATA "test.mpg" diff --git a/dlls/winmm/tests/test.mpg b/dlls/winmm/tests/test.mpg new file mode 100644 index 0000000000000000000000000000000000000000..97bb1abae1d6f0676b9f9484b9847c587bb7dd89 GIT binary patch literal 12288 zcmeHtX;>4<_il$>7C}K}QG=rbBC<vVMT58kL2yMzA)tha$|&F{xX?ibS43IDq7py^ z1tkKbxM70`2mvETjSOnQ2#D-!$kJW6aDM;$+~vc)AMSHMO`7ghcj&70sq?<)oVS7? zq^I)`5<<$!xsM>EXNWdzsLTUxZJm{srtnIe%4<7B`9#SyM45gKo|h>hhWY@s8N&8s zL<4b!?+Bs`Cg3|sf4DMswuZ42X-HccQDqtHuSY_zT3nsO>a$o7>uRXSTd20owsgOH z?0x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Of0skiZ9gxHR{}}=jD=LDz{NyD}Lj1aI^49;`ZPEkKe~0)#o9q9Rp&-%0-)yP= Xt_%Ks{cC}LE%2`e{<XmWTMPU*9lmux
literal 0 HcmV?d00001
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=118276
Your paranoid android.
=== w1064 (64 bit report) ===
winmm: midi.c:879: Test failed: expected 50ms or greater, got 103ms midi.c:944: Test failed: expected 300 ~ 400ms, got 505ms (dev=0)
On 7/5/22 06:34, Akihiro Sagawa wrote:
+static void test_video_window(HWND hwnd) +{
- const WCHAR *filename = load_resource(L"test.mpg");
- MCI_PARMS_UNION parm;
- MCIERROR err;
- HWND video_window, parent;
- MCIDEVICEID wDeviceID;
- DWORD style, expected;
- BOOL ret;
- parm.dgv_open.lpstrDeviceType = (WCHAR *)L"MPEGVideo";
- parm.dgv_open.lpstrElementName = (WCHAR *)filename;
- parm.dgv_open.hWndParent = hwnd;
- err = mciSendCommandW(0, MCI_OPEN,
MCI_OPEN_ELEMENT | MCI_OPEN_TYPE | MCI_DGV_OPEN_PARENT,
(DWORD_PTR)&parm);
- ok(!err,"mciCommand open test.mpg type MPEGVideo returned %s\n", dbg_mcierr(err));
- wDeviceID = parm.dgv_open.wDeviceID;
- parm.status.dwItem = MCI_DGV_STATUS_HWND;
- parm.status.dwReturn = 0xdeadbeef;
- err = mciSendCommandW(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm);
- todo_wine ok(!err,"mciCommand status hwnd returned %s\n", dbg_mcierr(err));
- if (err)
- {
skip("MCI_DGV_STATUS_HWND got an error\n");
goto close;
- }
- video_window = (HWND)parm.status.dwReturn;
- ok(IsWindow(video_window), "video window %p doesn't exist.\n", video_window);
- parent = GetWindow(video_window, GW_OWNER);
- ok(hwnd == parent, "expected owner %p, got %p\n", hwnd, parent);
- style = GetWindowLongW(video_window, GWL_STYLE);
- expected = (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW) & ~WS_MAXIMIZEBOX;
- ok(style == expected, "expected style %08lx, got %08lx\n", expected, style);
Could you please also test the case where no parent is specified?
+close:
- err = mciSendCommandW(wDeviceID, MCI_CLOSE, 0, 0);
- ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err));
- ret = DeleteFileW(filename);
- ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError());
+}
From: Akihiro Sagawa sagawa.aki@gmail.com
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com --- dlls/mciqtz32/mciqtz.c | 6 ++++++ dlls/winmm/tests/mci.c | 8 +------- 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index 92622d848a9..d8cc55ba2b9 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -916,6 +916,12 @@ static DWORD MCIQTZ_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMS MCI_FORMAT_RETURN_BASE + wma->time_format); ret = MCI_RESOURCE_RETURNED; break; + case MCI_DGV_STATUS_HWND: + if (wma->window) + lpParms->dwReturn = (DWORD_PTR)wma->parent; + else + ret = MCIERR_UNSUPPORTED_FUNCTION; + break; case MCI_STATUS_READY: FIXME("MCI_STATUS_READY not implemented yet\n"); return MCIERR_UNRECOGNIZED_COMMAND; diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index 9399a0fd284..8b281380a48 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -1475,12 +1475,7 @@ static void test_video_window(HWND hwnd) parm.status.dwItem = MCI_DGV_STATUS_HWND; parm.status.dwReturn = 0xdeadbeef; err = mciSendCommandW(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm); - todo_wine ok(!err,"mciCommand status hwnd returned %s\n", dbg_mcierr(err)); - if (err) - { - skip("MCI_DGV_STATUS_HWND got an error\n"); - goto close; - } + ok(!err,"mciCommand status hwnd returned %s\n", dbg_mcierr(err)); video_window = (HWND)parm.status.dwReturn;
ok(IsWindow(video_window), "video window %p doesn't exist.\n", video_window); @@ -1490,7 +1485,6 @@ static void test_video_window(HWND hwnd) expected = (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW) & ~WS_MAXIMIZEBOX; ok(style == expected, "expected style %08lx, got %08lx\n", expected, style);
-close: err = mciSendCommandW(wDeviceID, MCI_CLOSE, 0, 0); ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err));
From: Akihiro Sagawa sagawa.aki@gmail.com
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com --- dlls/winmm/tests/mci.c | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+)
diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index 8b281380a48..f123963d79a 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -39,6 +39,7 @@ typedef union { MCI_SYSINFO_PARMSA sys; MCI_SEEK_PARMS seek; MCI_DGV_OPEN_PARMSW dgv_open; + MCI_DGV_WINDOW_PARMSW win; MCI_GENERIC_PARMS gen; } MCI_PARMS_UNION;
@@ -1458,11 +1459,14 @@ static void test_video_window(HWND hwnd) const WCHAR *filename = load_resource(L"test.mpg"); MCI_PARMS_UNION parm; MCIERROR err; + WCHAR text[32], original[32]; HWND video_window, parent; MCIDEVICEID wDeviceID; DWORD style, expected; BOOL ret;
+ GetWindowTextW(hwnd, original, ARRAY_SIZE(original)); + parm.dgv_open.lpstrDeviceType = (WCHAR *)L"MPEGVideo"; parm.dgv_open.lpstrElementName = (WCHAR *)filename; parm.dgv_open.hWndParent = hwnd; @@ -1485,9 +1489,78 @@ static void test_video_window(HWND hwnd) expected = (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW) & ~WS_MAXIMIZEBOX; ok(style == expected, "expected style %08lx, got %08lx\n", expected, style);
+ err = mciSendCommandW(wDeviceID, MCI_WINDOW, 0, (DWORD_PTR)&parm); + ok(!err,"mciCommand window 0 returned %s\n", dbg_mcierr(err)); + + parm.win.lpstrText = (LPWSTR)L"abracadabra"; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm); + ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err)); + + GetWindowTextW(video_window, text, ARRAY_SIZE(text)); + todo_wine ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text)); + + ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window); + + /* MCI_PLAY shows default video window */ + err = mciSendCommandW(wDeviceID, MCI_PLAY, 0, (DWORD_PTR)&parm); + ok(!err,"mciCommand play returned %s\n", dbg_mcierr(err)); + ok(IsWindowVisible(video_window), "video window (%p) should be visible\n", video_window); + + /* MCI_STOP doesn't hide the window */ + err = mciSendCommandW(wDeviceID, MCI_STOP, 0, (DWORD_PTR)&parm); + ok(!err,"mciCommand stop returned %s\n", dbg_mcierr(err)); + ok(IsWindowVisible(video_window), "video window (%p) should be visible\n", video_window); + + parm.win.nCmdShow = SW_HIDE; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm); + ok(!err,"mciCommand window state returned %s\n", dbg_mcierr(err)); + todo_wine ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window); + + parm.win.hWnd = (HWND)0xdeadbeef; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm); + todo_wine ok(err == MCIERR_NO_WINDOW, "mciCommand window hwnd returned %s\n", dbg_mcierr(err)); + + parm.win.hWnd = hwnd; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm); + ok(!err,"mciCommand window hwnd returned %s\n", dbg_mcierr(err)); + + parm.status.dwItem = MCI_DGV_STATUS_HWND; + parm.status.dwReturn = 0xdeadbeef; + err = mciSendCommandW(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm); + ok(!err,"mciCommand status hwnd returned %s\n", dbg_mcierr(err)); + video_window = (HWND)parm.status.dwReturn; + + ok(video_window == hwnd, "got %p, expected %p\n", video_window, hwnd); + + parm.win.lpstrText = (LPWSTR)L"foobar"; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm); + ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err)); + + GetWindowTextW(hwnd, text, ARRAY_SIZE(text)); + todo_wine ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text)); + + parm.win.lpstrText = NULL; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm); + ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err)); + GetWindowTextW(hwnd, text, ARRAY_SIZE(text)); + todo_wine ok(!wcscmp(text, L""), "expected L"", got %s\n", debugstr_w(text)); + + /* MCI_PLAY shows parent window */ + err = mciSendCommandW(wDeviceID, MCI_PLAY, 0, (DWORD_PTR)&parm); + ok(!err,"mciCommand play returned %s\n", dbg_mcierr(err)); + ok(IsWindowVisible(hwnd), "window (%p) should be visible\n", hwnd); + + parm.win.nCmdShow = SW_HIDE; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm); + ok(!err,"mciCommand window state returned %s\n", dbg_mcierr(err)); + todo_wine ok(!IsWindowVisible(hwnd), "window (%p) should be hidden\n", hwnd); + err = mciSendCommandW(wDeviceID, MCI_CLOSE, 0, 0); ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err));
+ SetWindowTextW(hwnd, original); + ShowWindow(hwnd, SW_HIDE); + ret = DeleteFileW(filename); ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError()); }
On 7/5/22 06:34, Akihiro Sagawa wrote:
@@ -1458,11 +1459,14 @@ static void test_video_window(HWND hwnd) const WCHAR *filename = load_resource(L"test.mpg"); MCI_PARMS_UNION parm; MCIERROR err;
WCHAR text[32], original[32]; HWND video_window, parent; MCIDEVICEID wDeviceID; DWORD style, expected; BOOL ret;
GetWindowTextW(hwnd, original, ARRAY_SIZE(original));
parm.dgv_open.lpstrDeviceType = (WCHAR *)L"MPEGVideo"; parm.dgv_open.lpstrElementName = (WCHAR *)filename; parm.dgv_open.hWndParent = hwnd;
@@ -1485,9 +1489,78 @@ static void test_video_window(HWND hwnd) expected = (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW) & ~WS_MAXIMIZEBOX; ok(style == expected, "expected style %08lx, got %08lx\n", expected, style);
err = mciSendCommandW(wDeviceID, MCI_WINDOW, 0, (DWORD_PTR)&parm);
ok(!err,"mciCommand window 0 returned %s\n", dbg_mcierr(err));
parm.win.lpstrText = (LPWSTR)L"abracadabra";
err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm);
ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err));
GetWindowTextW(video_window, text, ARRAY_SIZE(text));
todo_wine ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text));
ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window);
/* MCI_PLAY shows default video window */
err = mciSendCommandW(wDeviceID, MCI_PLAY, 0, (DWORD_PTR)&parm);
ok(!err,"mciCommand play returned %s\n", dbg_mcierr(err));
ok(IsWindowVisible(video_window), "video window (%p) should be visible\n", video_window);
/* MCI_STOP doesn't hide the window */
err = mciSendCommandW(wDeviceID, MCI_STOP, 0, (DWORD_PTR)&parm);
ok(!err,"mciCommand stop returned %s\n", dbg_mcierr(err));
ok(IsWindowVisible(video_window), "video window (%p) should be visible\n", video_window);
parm.win.nCmdShow = SW_HIDE;
err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm);
ok(!err,"mciCommand window state returned %s\n", dbg_mcierr(err));
todo_wine ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window);
parm.win.hWnd = (HWND)0xdeadbeef;
err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm);
todo_wine ok(err == MCIERR_NO_WINDOW, "mciCommand window hwnd returned %s\n", dbg_mcierr(err));
parm.win.hWnd = hwnd;
err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm);
ok(!err,"mciCommand window hwnd returned %s\n", dbg_mcierr(err));
parm.status.dwItem = MCI_DGV_STATUS_HWND;
parm.status.dwReturn = 0xdeadbeef;
err = mciSendCommandW(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm);
ok(!err,"mciCommand status hwnd returned %s\n", dbg_mcierr(err));
video_window = (HWND)parm.status.dwReturn;
ok(video_window == hwnd, "got %p, expected %p\n", video_window, hwnd);
parm.win.lpstrText = (LPWSTR)L"foobar";
err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm);
ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err));
GetWindowTextW(hwnd, text, ARRAY_SIZE(text));
todo_wine ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text));
parm.win.lpstrText = NULL;
err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm);
ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err));
GetWindowTextW(hwnd, text, ARRAY_SIZE(text));
todo_wine ok(!wcscmp(text, L""), "expected L"", got %s\n", debugstr_w(text));
/* MCI_PLAY shows parent window */
err = mciSendCommandW(wDeviceID, MCI_PLAY, 0, (DWORD_PTR)&parm);
ok(!err,"mciCommand play returned %s\n", dbg_mcierr(err));
ok(IsWindowVisible(hwnd), "window (%p) should be visible\n", hwnd);
parm.win.nCmdShow = SW_HIDE;
err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm);
ok(!err,"mciCommand window state returned %s\n", dbg_mcierr(err));
todo_wine ok(!IsWindowVisible(hwnd), "window (%p) should be hidden\n", hwnd);
err = mciSendCommandW(wDeviceID, MCI_CLOSE, 0, 0); ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err));
SetWindowTextW(hwnd, original);
ShowWindow(hwnd, SW_HIDE);
What's the point of this?
ret = DeleteFileW(filename); ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError());
}
On 7/7/22 14:19, Zebediah Figura wrote:
On 7/5/22 06:34, Akihiro Sagawa wrote:
@@ -1458,11 +1459,14 @@ static void test_video_window(HWND hwnd) const WCHAR *filename = load_resource(L"test.mpg"); MCI_PARMS_UNION parm; MCIERROR err; + WCHAR text[32], original[32]; HWND video_window, parent; MCIDEVICEID wDeviceID; DWORD style, expected; BOOL ret; + GetWindowTextW(hwnd, original, ARRAY_SIZE(original));
parm.dgv_open.lpstrDeviceType = (WCHAR *)L"MPEGVideo"; parm.dgv_open.lpstrElementName = (WCHAR *)filename; parm.dgv_open.hWndParent = hwnd; @@ -1485,9 +1489,78 @@ static void test_video_window(HWND hwnd) expected = (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW) & ~WS_MAXIMIZEBOX; ok(style == expected, "expected style %08lx, got %08lx\n", expected, style); + err = mciSendCommandW(wDeviceID, MCI_WINDOW, 0, (DWORD_PTR)&parm); + ok(!err,"mciCommand window 0 returned %s\n", dbg_mcierr(err));
+ parm.win.lpstrText = (LPWSTR)L"abracadabra"; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm); + ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err));
+ GetWindowTextW(video_window, text, ARRAY_SIZE(text)); + todo_wine ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text));
+ ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window);
+ /* MCI_PLAY shows default video window */ + err = mciSendCommandW(wDeviceID, MCI_PLAY, 0, (DWORD_PTR)&parm); + ok(!err,"mciCommand play returned %s\n", dbg_mcierr(err)); + ok(IsWindowVisible(video_window), "video window (%p) should be visible\n", video_window);
+ /* MCI_STOP doesn't hide the window */ + err = mciSendCommandW(wDeviceID, MCI_STOP, 0, (DWORD_PTR)&parm); + ok(!err,"mciCommand stop returned %s\n", dbg_mcierr(err)); + ok(IsWindowVisible(video_window), "video window (%p) should be visible\n", video_window);
+ parm.win.nCmdShow = SW_HIDE; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm); + ok(!err,"mciCommand window state returned %s\n", dbg_mcierr(err)); + todo_wine ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window);
+ parm.win.hWnd = (HWND)0xdeadbeef; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm); + todo_wine ok(err == MCIERR_NO_WINDOW, "mciCommand window hwnd returned %s\n", dbg_mcierr(err));
+ parm.win.hWnd = hwnd; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm); + ok(!err,"mciCommand window hwnd returned %s\n", dbg_mcierr(err));
+ parm.status.dwItem = MCI_DGV_STATUS_HWND; + parm.status.dwReturn = 0xdeadbeef; + err = mciSendCommandW(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm); + ok(!err,"mciCommand status hwnd returned %s\n", dbg_mcierr(err)); + video_window = (HWND)parm.status.dwReturn;
+ ok(video_window == hwnd, "got %p, expected %p\n", video_window, hwnd);
+ parm.win.lpstrText = (LPWSTR)L"foobar"; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm); + ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err));
+ GetWindowTextW(hwnd, text, ARRAY_SIZE(text)); + todo_wine ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text));
+ parm.win.lpstrText = NULL; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm); + ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err)); + GetWindowTextW(hwnd, text, ARRAY_SIZE(text)); + todo_wine ok(!wcscmp(text, L""), "expected L"", got %s\n", debugstr_w(text));
+ /* MCI_PLAY shows parent window */ + err = mciSendCommandW(wDeviceID, MCI_PLAY, 0, (DWORD_PTR)&parm); + ok(!err,"mciCommand play returned %s\n", dbg_mcierr(err)); + ok(IsWindowVisible(hwnd), "window (%p) should be visible\n", hwnd);
+ parm.win.nCmdShow = SW_HIDE; + err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm); + ok(!err,"mciCommand window state returned %s\n", dbg_mcierr(err)); + todo_wine ok(!IsWindowVisible(hwnd), "window (%p) should be hidden\n", hwnd);
err = mciSendCommandW(wDeviceID, MCI_CLOSE, 0, 0); ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err)); + SetWindowTextW(hwnd, original); + ShowWindow(hwnd, SW_HIDE);
What's the point of this?
To clarify, I mean restoring the previous text and hiding the window.
From: Akihiro Sagawa sagawa.aki@gmail.com
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com --- dlls/mciqtz32/mciqtz.c | 2 +- dlls/winmm/tests/mci.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index d8cc55ba2b9..e6ce2af59e8 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -1033,7 +1033,7 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS } if (dwFlags & MCI_DGV_WINDOW_STATE) { TRACE("Setting nCmdShow to %d\n", lpParms->nCmdShow); - IVideoWindow_put_WindowState(wma->vidwin, lpParms->nCmdShow); + ShowWindow(wma->parent, lpParms->nCmdShow); } if (dwFlags & MCI_DGV_WINDOW_TEXT) { TRACE("Setting caption to %s\n", debugstr_w(lpParms->lpstrText)); diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index f123963d79a..16bdeacd6cc 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -1514,7 +1514,7 @@ static void test_video_window(HWND hwnd) parm.win.nCmdShow = SW_HIDE; err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm); ok(!err,"mciCommand window state returned %s\n", dbg_mcierr(err)); - todo_wine ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window); + ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window);
parm.win.hWnd = (HWND)0xdeadbeef; err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&parm); @@ -1553,7 +1553,7 @@ static void test_video_window(HWND hwnd) parm.win.nCmdShow = SW_HIDE; err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_STATE, (DWORD_PTR)&parm); ok(!err,"mciCommand window state returned %s\n", dbg_mcierr(err)); - todo_wine ok(!IsWindowVisible(hwnd), "window (%p) should be hidden\n", hwnd); + ok(!IsWindowVisible(hwnd), "window (%p) should be hidden\n", hwnd);
err = mciSendCommandW(wDeviceID, MCI_CLOSE, 0, 0); ok(!err,"mciCommand close returned %s\n", dbg_mcierr(err));
From: Akihiro Sagawa sagawa.aki@gmail.com
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com --- dlls/mciqtz32/mciqtz.c | 2 +- dlls/winmm/tests/mci.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index e6ce2af59e8..24a41e9f4b8 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -1037,7 +1037,7 @@ static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMS } if (dwFlags & MCI_DGV_WINDOW_TEXT) { TRACE("Setting caption to %s\n", debugstr_w(lpParms->lpstrText)); - IVideoWindow_put_Caption(wma->vidwin, lpParms->lpstrText); + SetWindowTextW(wma->parent, lpParms->lpstrText); } return 0; } diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index 16bdeacd6cc..15354062919 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -1497,7 +1497,7 @@ static void test_video_window(HWND hwnd) ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err));
GetWindowTextW(video_window, text, ARRAY_SIZE(text)); - todo_wine ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text)); + ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text));
ok(!IsWindowVisible(video_window), "video window (%p) should be hidden\n", video_window);
@@ -1537,13 +1537,13 @@ static void test_video_window(HWND hwnd) ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err));
GetWindowTextW(hwnd, text, ARRAY_SIZE(text)); - todo_wine ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text)); + ok(!wcscmp(text, parm.win.lpstrText),"expected %s, got %s\n", debugstr_w(parm.win.lpstrText), debugstr_w(text));
parm.win.lpstrText = NULL; err = mciSendCommandW(wDeviceID, MCI_WINDOW, MCI_DGV_WINDOW_TEXT, (DWORD_PTR)&parm); ok(!err,"mciCommand window text returned %s\n", dbg_mcierr(err)); GetWindowTextW(hwnd, text, ARRAY_SIZE(text)); - todo_wine ok(!wcscmp(text, L""), "expected L"", got %s\n", debugstr_w(text)); + ok(!wcscmp(text, L""), "expected L"", got %s\n", debugstr_w(text));
/* MCI_PLAY shows parent window */ err = mciSendCommandW(wDeviceID, MCI_PLAY, 0, (DWORD_PTR)&parm);