From: Zebediah Figura zfigura@codeweavers.com
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 | 3 +++ 4 files changed, 12 insertions(+)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 7771c467a13..4b8bd4e7c2c 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -2396,6 +2396,9 @@ static void test_video_window(void) hr = IVideoWindow_put_AutoShow(window, OAFALSE); ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
+ hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); + testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); IFilterGraph2_AddFilter(graph, filter, NULL); diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index cbab6eb077d..73e7ff5ffe9 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -2395,6 +2395,9 @@ static void test_video_window(void) hr = IVideoWindow_put_AutoShow(window, OAFALSE); ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
+ hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); + testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); IFilterGraph2_AddFilter(graph, filter, NULL); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 9c5ec2129a3..27117db9f02 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -2621,6 +2621,9 @@ static void test_video_window(void) hr = IVideoWindow_put_AutoShow(window, OAFALSE); ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
+ hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); + testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); IFilterGraph2_AddFilter(graph, filter, NULL); diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c index 617d45b74e0..f09dd5aea56 100644 --- a/dlls/quartz/window.c +++ b/dlls/quartz/window.c @@ -482,6 +482,9 @@ HRESULT WINAPI BaseControlWindowImpl_put_Owner(IVideoWindow *iface, OAHWND owner
TRACE("window %p, owner %#Ix.\n", window, owner);
+ if (!window->pPin->peer) + return VFW_E_NOT_CONNECTED; + /* Make sure we are marked as WS_CHILD before reparenting ourselves, so that * we do not steal focus. LEGO Island depends on this. */