Module: wine Branch: master Commit: 9b47d3c54358d21f994399e66caf434f6e24ac04 URL: https://gitlab.winehq.org/wine/wine/-/commit/9b47d3c54358d21f994399e66caf434...
Author: Zebediah Figura zfigura@codeweavers.com Date: Wed May 3 13:03:44 2023 -0500
quartz: Check whether the pin is connected in IVideoWindow::put_WindowStyle().
Ferro CCTV calls this.
---
dlls/quartz/tests/videorenderer.c | 3 +++ dlls/quartz/tests/vmr7.c | 3 +++ dlls/quartz/tests/vmr9.c | 3 +++ dlls/quartz/window.c | 2 ++ 4 files changed, 11 insertions(+)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 903f173386b..f386d0e3edf 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -2387,6 +2387,9 @@ static void test_video_window(void) hr = IVideoWindow_get_WindowStyle(window, &l); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
+ hr = IVideoWindow_put_WindowStyle(window, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); + hr = IVideoWindow_get_AutoShow(window, &l); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 5019d1b610c..7240e51b1d9 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -2386,6 +2386,9 @@ static void test_video_window(void) hr = IVideoWindow_get_WindowStyle(window, &l); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
+ hr = IVideoWindow_put_WindowStyle(window, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); + hr = IVideoWindow_get_AutoShow(window, &l); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 838ba812299..8249857ff60 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -2612,6 +2612,9 @@ static void test_video_window(void) hr = IVideoWindow_get_WindowStyle(window, &l); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
+ hr = IVideoWindow_put_WindowStyle(window, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); + hr = IVideoWindow_get_AutoShow(window, &l); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c index 3f8d862fccd..f7242ecff58 100644 --- a/dlls/quartz/window.c +++ b/dlls/quartz/window.c @@ -231,6 +231,8 @@ HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG s
if (style & (WS_DISABLED|WS_HSCROLL|WS_MAXIMIZE|WS_MINIMIZE|WS_VSCROLL)) return E_INVALIDARG; + if (!window->pPin->peer) + return VFW_E_NOT_CONNECTED;
SetWindowLongW(window->hwnd, GWL_STYLE, style); SetWindowPos(window->hwnd, 0, 0, 0, 0, 0,