From: Elizabeth Figura zfigura@codeweavers.com
Based on a patch by Attila Fidan. --- dlls/quartz/tests/videorenderer.c | 32 +++++++++++++++++++++++++++---- dlls/quartz/tests/vmr7.c | 32 +++++++++++++++++++++++++++---- dlls/quartz/tests/vmr9.c | 32 +++++++++++++++++++++++++++---- 3 files changed, 84 insertions(+), 12 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index ea54ec87a8e..27d211b819a 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1713,15 +1713,31 @@ static void test_video_window_style(IVideoWindow *window, HWND hwnd, HWND our_hw hr = IVideoWindow_put_WindowStyle(window, style | WS_MINIMIZE); ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
- hr = IVideoWindow_put_WindowStyle(window, style & ~WS_CLIPCHILDREN); + hr = IVideoWindow_put_WindowStyle(window, + (style | WS_VISIBLE | WS_POPUP | WS_GROUP | WS_TABSTOP) & ~WS_CLIPCHILDREN); ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &style); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP | WS_GROUP | WS_TABSTOP), + "Got style %#lx.\n", style); + + style = GetWindowLongA(hwnd, GWL_STYLE); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP | WS_GROUP | WS_TABSTOP), + "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, 0); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IVideoWindow_get_WindowStyle(window, &style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == WS_CLIPSIBLINGS, "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + ok(style == WS_CLIPSIBLINGS, "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flaky_wine ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); @@ -1765,8 +1781,8 @@ static HWND get_top_window(void)
static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hwnd) { + LONG state, style; HRESULT hr; - LONG state; HWND top;
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); @@ -1814,6 +1830,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(!IsZoomed(hwnd), "Window should not be maximized.\n"); ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
+ hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IVideoWindow_get_WindowStyle(window, &style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(style == (WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_VISIBLE | WS_MINIMIZE), + "Got style %#lx.\n", style); + hr = IVideoWindow_put_WindowState(window, SW_RESTORE); ok(hr == S_OK, "Got hr %#lx.\n", hr);
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index ff15ad9c81d..8e63d5fdae6 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -1728,15 +1728,31 @@ static void test_video_window_style(IVideoWindow *window, HWND hwnd, HWND our_hw hr = IVideoWindow_put_WindowStyle(window, style | WS_MINIMIZE); ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
- hr = IVideoWindow_put_WindowStyle(window, style & ~WS_CLIPCHILDREN); + hr = IVideoWindow_put_WindowStyle(window, + (style | WS_VISIBLE | WS_POPUP | WS_GROUP | WS_TABSTOP) & ~WS_CLIPCHILDREN); ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &style); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP | WS_GROUP | WS_TABSTOP), + "Got style %#lx.\n", style); + + style = GetWindowLongA(hwnd, GWL_STYLE); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP | WS_GROUP | WS_TABSTOP), + "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, 0); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IVideoWindow_get_WindowStyle(window, &style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == WS_CLIPSIBLINGS, "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + ok(style == WS_CLIPSIBLINGS, "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flaky_wine ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); @@ -1780,8 +1796,8 @@ static HWND get_top_window(void)
static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hwnd) { + LONG state, style; HRESULT hr; - LONG state; HWND top;
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); @@ -1829,6 +1845,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(!IsZoomed(hwnd), "Window should not be maximized.\n"); ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
+ hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IVideoWindow_get_WindowStyle(window, &style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(style == (WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_VISIBLE | WS_MINIMIZE), + "Got style %#lx.\n", style); + hr = IVideoWindow_put_WindowState(window, SW_RESTORE); ok(hr == S_OK, "Got hr %#lx.\n", hr);
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index bdd3516da73..48a6229a099 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1939,15 +1939,31 @@ static void test_video_window_style(IVideoWindow *window, HWND hwnd, HWND our_hw hr = IVideoWindow_put_WindowStyle(window, style | WS_MINIMIZE); ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
- hr = IVideoWindow_put_WindowStyle(window, style & ~WS_CLIPCHILDREN); + hr = IVideoWindow_put_WindowStyle(window, + (style | WS_VISIBLE | WS_POPUP | WS_GROUP | WS_TABSTOP) & ~WS_CLIPCHILDREN); ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &style); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP | WS_GROUP | WS_TABSTOP), + "Got style %#lx.\n", style); + + style = GetWindowLongA(hwnd, GWL_STYLE); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP | WS_GROUP | WS_TABSTOP), + "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, 0); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IVideoWindow_get_WindowStyle(window, &style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == WS_CLIPSIBLINGS, "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + ok(style == WS_CLIPSIBLINGS, "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flaky_wine ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); @@ -1991,8 +2007,8 @@ static HWND get_top_window(void)
static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hwnd) { + LONG state, style; HRESULT hr; - LONG state; HWND top;
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); @@ -2040,6 +2056,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(!IsZoomed(hwnd), "Window should not be maximized.\n"); ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
+ hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IVideoWindow_get_WindowStyle(window, &style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(style == (WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_VISIBLE | WS_MINIMIZE), + "Got style %#lx.\n", style); + hr = IVideoWindow_put_WindowState(window, SW_RESTORE); ok(hr == S_OK, "Got hr %#lx.\n", hr);