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

Ferro CCTV calls this.
This commit is contained in:
Zebediah Figura 2023-05-03 13:19:35 -05:00 committed by Alexandre Julliard
parent 8be62e8e30
commit 298ffd8f80
4 changed files with 12 additions and 0 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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;