Commit 298ffd8f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Check whether the pin is connected in IVideoWindow::SetWindowPosition().

Ferro CCTV calls this.
parent 8be62e8e
......@@ -2405,6 +2405,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_Visible(window, OATRUE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_SetWindowPosition(window, 100, 200, 300, 400);
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);
......
......@@ -2404,6 +2404,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_Visible(window, OATRUE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_SetWindowPosition(window, 100, 200, 300, 400);
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);
......
......@@ -2630,6 +2630,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_Visible(window, OATRUE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_SetWindowPosition(window, 100, 200, 300, 400);
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);
......
......@@ -598,6 +598,9 @@ HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition(IVideoWindow *iface,
TRACE("window %p, left %ld, top %ld, width %ld, height %ld.\n", window, left, top, width, height);
if (!window->pPin->peer)
return VFW_E_NOT_CONNECTED;
if (!SetWindowPos(window->hwnd, NULL, left, top, width, height, SWP_NOACTIVATE | SWP_NOZORDER))
return E_FAIL;
return S_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment