[PATCH 3/5] strmbase: IVideoWindow::SetWindowForeground takes OATRUE, not TRUE.

Zebediah Figura z.figura12 at gmail.com
Mon Oct 7 18:55:44 CDT 2019


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/quartz/tests/videorenderer.c | 18 +++++++++---------
 dlls/strmbase/window.c            |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c
index cd8fa4d511d..ae467ed71aa 100644
--- a/dlls/quartz/tests/videorenderer.c
+++ b/dlls/quartz/tests/videorenderer.c
@@ -1609,17 +1609,17 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
     hr = IVideoWindow_put_WindowState(window, SW_SHOWNA);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
+    hr = IVideoWindow_SetWindowForeground(window, TRUE);
+    ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+
     SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
     hr = IVideoWindow_SetWindowForeground(window, OATRUE);
-    todo_wine
-    {
-        ok(hr == S_OK, "Got hr %#x.\n", hr);
-        ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
-        ok(GetFocus() == hwnd, "Got focus window %p.\n", GetFocus());
-        ok(GetForegroundWindow() == hwnd, "Got foreground window %p.\n", GetForegroundWindow());
-        top = get_top_window();
-        ok(top == hwnd, "Got top window %p.\n", top);
-    }
+    ok(hr == S_OK, "Got hr %#x.\n", hr);
+    ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
+    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);
 
     hr = IVideoWindow_SetWindowForeground(window, OAFALSE);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c
index 4ecc81c24e5..f280b323ab0 100644
--- a/dlls/strmbase/window.c
+++ b/dlls/strmbase/window.c
@@ -652,7 +652,7 @@ HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LO
 
     TRACE("(%p/%p)->(%d)\n", This, iface, Focus);
 
-    if ((Focus != FALSE) && (Focus != TRUE))
+    if ((Focus != OAFALSE) && (Focus != OATRUE))
         return E_INVALIDARG;
 
     hr = IPin_ConnectedTo(&This->pPin->IPin_iface, &pPin);
-- 
2.23.0




More information about the wine-devel mailing list