Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/videorenderer.c | 2 +- dlls/strmbase/window.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index f1f901d164d..e1b1f17c72a 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1928,7 +1928,7 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap
hr = IVideoWindow_get_AutoShow(window, &l); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(l == OATRUE, "Got %d.\n", l); + ok(l == OATRUE, "Got %d.\n", l);
hr = IVideoWindow_put_Visible(window, OAFALSE); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index cb41aee2f4f..66db2d6c07e 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -203,7 +203,7 @@ HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, if (SUCCEEDED(hr)) { pControlWindow->IVideoWindow_iface.lpVtbl = lpVtbl; - pControlWindow->AutoShow = TRUE; + pControlWindow->AutoShow = OATRUE; pControlWindow->hwndDrain = NULL; pControlWindow->hwndOwner = NULL; pControlWindow->pFilter = owner;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/videorenderer.c | 16 ++++++++-------- dlls/strmbase/window.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index e1b1f17c72a..558dc26cb9e 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1504,7 +1504,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw todo_wine ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - todo_wine ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %d.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1521,7 +1521,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw todo_wine ok(state == SW_MINIMIZE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - todo_wine ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %d.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(IsIconic(hwnd), "Window should be minimized.\n"); @@ -1536,7 +1536,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw todo_wine ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - todo_wine ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %d.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1551,7 +1551,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(state == SW_MAXIMIZE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - todo_wine ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %d.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should be minimized.\n"); @@ -1584,7 +1584,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw todo_wine ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - todo_wine ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %d.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1828,7 +1828,7 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_Visible(window, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %d.\n", state); }
static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our_hwnd) @@ -1938,14 +1938,14 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap
hr = IVideoWindow_get_Visible(window, &l); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(l == OATRUE, "Got %d.\n", l); + ok(l == OATRUE, "Got %d.\n", l);
hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(l == OATRUE, "Got %d.\n", l); + ok(l == OATRUE, "Got %d.\n", l);
hr = IVideoWindow_put_AutoShow(window, OAFALSE); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 66db2d6c07e..ecedc174893 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -449,7 +449,7 @@ HRESULT WINAPI BaseControlWindowImpl_get_Visible(IVideoWindow *iface, LONG *pVis
TRACE("(%p/%p)->(%p)\n", This, iface, pVisible);
- *pVisible = IsWindowVisible(This->baseWindow.hWnd); + *pVisible = IsWindowVisible(This->baseWindow.hWnd) ? OATRUE : OAFALSE;
return S_OK; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/videorenderer.c | 2 +- dlls/strmbase/window.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 558dc26cb9e..1c16fa1f825 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1438,7 +1438,7 @@ static void test_video_window_style(IVideoWindow *window, HWND hwnd, HWND our_hw style = GetWindowLongA(hwnd, GWL_STYLE); todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#x.\n", style);
- todo_wine ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); + ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_get_WindowStyleEx(window, &style); ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index ecedc174893..206aecb8ded 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -330,7 +330,8 @@ HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG W return E_INVALIDARG;
SetWindowLongW(This->baseWindow.hWnd, GWL_STYLE, WindowStyle); - SetWindowPos(This->baseWindow.hWnd,0,0,0,0,0,SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOZORDER); + SetWindowPos(This->baseWindow.hWnd, 0, 0, 0, 0, 0, + SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED); This->baseWindow.WindowStyles = WindowStyle;
return S_OK;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/videorenderer.c | 14 +++++++------- dlls/strmbase/window.c | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 1c16fa1f825..96a2b1cabbf 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1487,7 +1487,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == SW_HIDE, "Got state %d.\n", state); + ok(state == SW_HIDE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); ok(state == OAFALSE, "Got state %d.\n", state); @@ -1501,7 +1501,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == SW_SHOW, "Got state %d.\n", state); + ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); ok(state == OATRUE, "Got state %d.\n", state); @@ -1518,7 +1518,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == SW_MINIMIZE, "Got state %d.\n", state); + ok(state == SW_MINIMIZE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); ok(state == OATRUE, "Got state %d.\n", state); @@ -1533,7 +1533,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == SW_SHOW, "Got state %d.\n", state); + ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); ok(state == OATRUE, "Got state %d.\n", state); @@ -1566,7 +1566,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == SW_HIDE, "Got state %d.\n", state); + ok(state == SW_HIDE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); ok(state == OAFALSE, "Got state %d.\n", state); @@ -1581,7 +1581,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == SW_SHOW, "Got state %d.\n", state); + ok(state == SW_SHOW, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); ok(state == OATRUE, "Got state %d.\n", state); @@ -1596,7 +1596,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
hr = IVideoWindow_get_WindowState(window, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == SW_HIDE, "Got state %d.\n", state); + ok(state == SW_HIDE, "Got state %d.\n", state);
hr = IVideoWindow_get_Visible(window, &state); ok(state == OAFALSE, "Got state %d.\n", state); diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 206aecb8ded..57dbaca8bf3 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -402,15 +402,22 @@ HRESULT WINAPI BaseControlWindowImpl_put_WindowState(IVideoWindow *iface, LONG W return S_OK; }
-HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *WindowState) +HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *state) { - WINDOWPLACEMENT place; - BaseControlWindow* This = impl_from_IVideoWindow(iface); + BaseControlWindow *window = impl_from_IVideoWindow(iface); + DWORD style;
- place.length = sizeof(place); - GetWindowPlacement(This->baseWindow.hWnd, &place); - TRACE("(%p/%p)->(%p)\n", This, iface, WindowState); - *WindowState = place.showCmd; + TRACE("window %p, state %p.\n", window, state); + + style = GetWindowLongPtrW(window->baseWindow.hWnd, GWL_STYLE); + if (!(style & WS_VISIBLE)) + *state = SW_HIDE; + else if (style & WS_MINIMIZE) + *state = SW_MINIMIZE; + else if (style & WS_MAXIMIZE) + *state = SW_MAXIMIZE; + else + *state = SW_SHOW;
return S_OK; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=57662
Your paranoid android.
=== wvistau64_he (32 bit report) ===
quartz: videorenderer.c:1607: Test failed: Got active window 00000000.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/videorenderer.c | 8 ++++---- dlls/strmbase/window.c | 22 +++++++++------------- 2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 96a2b1cabbf..c851146af78 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1619,7 +1619,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetFocus() == hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == hwnd, "Got foreground window %p.\n", GetForegroundWindow()); top = get_top_window(); - todo_wine ok(top == hwnd, "Got top window %p.\n", top); + ok(top == hwnd, "Got top window %p.\n", top);
hr = IVideoWindow_SetWindowForeground(window, OAFALSE); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -1632,9 +1632,9 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); hr = IVideoWindow_SetWindowForeground(window, OAFALSE); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); - todo_wine ok(GetFocus() == our_hwnd, "Got focus window %p.\n", GetFocus()); - todo_wine ok(GetForegroundWindow() == our_hwnd, "Got foreground window %p.\n", GetForegroundWindow()); + ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); + ok(GetFocus() == our_hwnd, "Got focus window %p.\n", GetFocus()); + ok(GetForegroundWindow() == our_hwnd, "Got foreground window %p.\n", GetForegroundWindow()); top = get_top_window(); ok(top == hwnd, "Got top window %p.\n", top); } diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 57dbaca8bf3..9a915867833 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -654,29 +654,25 @@ HRESULT WINAPI BaseControlWindowImpl_put_FullScreenMode(IVideoWindow *iface, LON return E_NOTIMPL; }
-HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LONG Focus) +HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LONG focus) { - BaseControlWindow* This = impl_from_IVideoWindow(iface); - BOOL ret; + BaseControlWindow *window = impl_from_IVideoWindow(iface); + UINT flags = SWP_NOMOVE | SWP_NOSIZE; IPin* pPin; HRESULT hr;
- TRACE("(%p/%p)->(%d)\n", This, iface, Focus); + TRACE("window %p, focus %d.\n", window, focus);
- if ((Focus != OAFALSE) && (Focus != OATRUE)) + if (focus != OAFALSE && focus != OATRUE) return E_INVALIDARG;
- hr = IPin_ConnectedTo(&This->pPin->IPin_iface, &pPin); + hr = IPin_ConnectedTo(&window->pPin->IPin_iface, &pPin); if ((hr != S_OK) || !pPin) return VFW_E_NOT_CONNECTED;
- if (Focus) - ret = SetForegroundWindow(This->baseWindow.hWnd); - else - ret = SetWindowPos(This->baseWindow.hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - - if (!ret) - return E_FAIL; + if (!focus) + flags |= SWP_NOACTIVATE; + SetWindowPos(window->baseWindow.hWnd, HWND_TOP, 0, 0, 0, 0, flags);
return S_OK; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=57663
Your paranoid android.
=== wvistau64_he (32 bit report) ===
quartz: videorenderer.c:1071: Test failed: Expected EC_COMPLETE. videorenderer.c:1076: Test failed: Got unexpected EC_COMPLETE.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/videorenderer.c | 2 +- dlls/strmbase/window.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index c851146af78..69bbc57949d 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -2076,7 +2076,7 @@ static void test_video_window(void) ref = IBaseFilter_Release(filter); ok(!ref, "Got outstanding refcount %d.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - todo_wine ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %d.\n", ref); DestroyWindow(our_hwnd); }
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 9a915867833..7f4dd402484 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -658,16 +658,13 @@ HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LO { BaseControlWindow *window = impl_from_IVideoWindow(iface); UINT flags = SWP_NOMOVE | SWP_NOSIZE; - IPin* pPin; - HRESULT hr;
TRACE("window %p, focus %d.\n", window, focus);
if (focus != OAFALSE && focus != OATRUE) return E_INVALIDARG;
- hr = IPin_ConnectedTo(&window->pPin->IPin_iface, &pPin); - if ((hr != S_OK) || !pPin) + if (!window->pPin->peer) return VFW_E_NOT_CONNECTED;
if (!focus)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=57664
Your paranoid android.
=== w8 (32 bit report) ===
quartz: videorenderer.c:969: Test failed: Thread should block in Receive().
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=57659
Your paranoid android.
=== w864 (32 bit report) ===
quartz: videorenderer.c:1893: Test failed: Got unexpected message 0x113.