From: Elizabeth Figura zfigura@codeweavers.com
Based on a patch by Attila Fidan. --- dlls/quartz/tests/videorenderer.c | 44 ++++++++++++++++++++++++++----- dlls/quartz/tests/vmr7.c | 44 ++++++++++++++++++++++++++----- dlls/quartz/tests/vmr9.c | 44 ++++++++++++++++++++++++++----- 3 files changed, 111 insertions(+), 21 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index ea54ec87a8e..17ccff23cba 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1713,15 +1713,28 @@ 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_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), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP), "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, "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 +1778,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 +1827,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);
@@ -2096,6 +2117,15 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == OAFALSE, "Got state %ld.\n", state);
+ style = GetWindowLongA(hwnd, GWL_STYLE); + ok(style == (WS_OVERLAPPEDWINDOW | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS), "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CHILD); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + style = GetWindowLongA(hwnd, GWL_STYLE); + todo_wine ok(style == (WS_OVERLAPPEDWINDOW | WS_CHILD), "Got style %#lx.\n", style); + hr = IVideoWindow_put_Owner(window, 0); ok(hr == S_OK, "Got hr %#lx.\n", hr);
@@ -2106,15 +2136,15 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#lx.\n", style); + todo_wine ok(style == WS_OVERLAPPEDWINDOW, "Got style %#lx.\n", style);
ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); - ok(top_hwnd == hwnd, "Got top window %p.\n", top_hwnd); + todo_wine ok(top_hwnd == our_hwnd, "Got top window %p.\n", top_hwnd);
hr = IVideoWindow_get_Visible(window, &state); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(state == OATRUE, "Got state %ld.\n", state); + todo_wine ok(state == OAFALSE, "Got state %ld.\n", state); }
struct notify_message_params diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index ff15ad9c81d..c5e4e3a5aee 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -1728,15 +1728,28 @@ 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_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), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP), "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, "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 +1793,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 +1842,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);
@@ -2111,6 +2132,15 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == OAFALSE, "Got state %ld.\n", state);
+ style = GetWindowLongA(hwnd, GWL_STYLE); + ok(style == (WS_OVERLAPPEDWINDOW | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS), "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CHILD); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + style = GetWindowLongA(hwnd, GWL_STYLE); + todo_wine ok(style == (WS_OVERLAPPEDWINDOW | WS_CHILD), "Got style %#lx.\n", style); + hr = IVideoWindow_put_Owner(window, 0); ok(hr == S_OK, "Got hr %#lx.\n", hr);
@@ -2121,15 +2151,15 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#lx.\n", style); + todo_wine ok(style == WS_OVERLAPPEDWINDOW, "Got style %#lx.\n", style);
ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); - ok(top_hwnd == hwnd, "Got top window %p.\n", top_hwnd); + todo_wine ok(top_hwnd == our_hwnd, "Got top window %p.\n", top_hwnd);
hr = IVideoWindow_get_Visible(window, &state); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(state == OATRUE, "Got state %ld.\n", state); + todo_wine ok(state == OAFALSE, "Got state %ld.\n", state); }
struct notify_message_params diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index bdd3516da73..6e1eab1a88e 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1939,15 +1939,28 @@ 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_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), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style); + todo_wine ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW | WS_POPUP), "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, "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 +2004,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 +2053,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);
@@ -2322,6 +2343,15 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == OAFALSE, "Got state %ld.\n", state);
+ style = GetWindowLongA(hwnd, GWL_STYLE); + ok(style == (WS_OVERLAPPEDWINDOW | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS), "Got style %#lx.\n", style); + + hr = IVideoWindow_put_WindowStyle(window, WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CHILD); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + style = GetWindowLongA(hwnd, GWL_STYLE); + todo_wine ok(style == (WS_OVERLAPPEDWINDOW | WS_CHILD), "Got style %#lx.\n", style); + hr = IVideoWindow_put_Owner(window, 0); ok(hr == S_OK, "Got hr %#lx.\n", hr);
@@ -2332,15 +2362,15 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#lx.\n", style); + todo_wine ok(style == WS_OVERLAPPEDWINDOW, "Got style %#lx.\n", style);
ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); - ok(top_hwnd == hwnd, "Got top window %p.\n", top_hwnd); + todo_wine ok(top_hwnd == our_hwnd, "Got top window %p.\n", top_hwnd);
hr = IVideoWindow_get_Visible(window, &state); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(state == OATRUE, "Got state %ld.\n", state); + todo_wine ok(state == OAFALSE, "Got state %ld.\n", state); }
struct notify_message_params