diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index 0df8c9fa738..c1a2e882dc9 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -1346,7 +1346,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ret = check_ec_userabort(eventsrc, 0); todo_wine ok(ret == 1, "Expected EC_USERABORT.\n"); - todo_wine ok(IsWindow(hwnd), "Window should exist.\n"); + ok(IsWindow(hwnd), "Window should exist.\n"); ok(!IsWindowVisible(hwnd), "Window should be visible.\n"); thread = send_frame(input); @@ -1385,7 +1385,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ret = check_ec_userabort(eventsrc, 0); todo_wine ok(ret == 1, "Expected EC_USERABORT.\n"); - todo_wine ok(IsWindow(hwnd), "Window should exist.\n"); + ok(IsWindow(hwnd), "Window should exist.\n"); ok(!IsWindowVisible(hwnd), "Window should be visible.\n"); hr = IMediaControl_Stop(control); diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 4673601a40b..b8af2163099 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -1377,7 +1377,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ret = check_ec_userabort(eventsrc, 0); todo_wine ok(ret == 1, "Expected EC_USERABORT.\n"); - todo_wine ok(IsWindow(hwnd), "Window should exist.\n"); + ok(IsWindow(hwnd), "Window should exist.\n"); ok(!IsWindowVisible(hwnd), "Window should be visible.\n"); thread = send_frame(input); @@ -1417,7 +1417,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ret = check_ec_userabort(eventsrc, 0); todo_wine ok(ret == 1, "Expected EC_USERABORT.\n"); - todo_wine ok(IsWindow(hwnd), "Window should exist.\n"); + ok(IsWindow(hwnd), "Window should exist.\n"); ok(!IsWindowVisible(hwnd), "Window should be visible.\n"); hr = IMediaControl_Stop(control); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 6c863a15a29..3f6982dfb5a 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1582,7 +1582,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ret = check_ec_userabort(eventsrc, 0); todo_wine ok(ret == 1, "Expected EC_USERABORT.\n"); - todo_wine ok(IsWindow(hwnd), "Window should exist.\n"); + ok(IsWindow(hwnd), "Window should exist.\n"); ok(!IsWindowVisible(hwnd), "Window should be visible.\n"); thread = send_frame(input); @@ -1622,7 +1622,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ret = check_ec_userabort(eventsrc, 0); todo_wine ok(ret == 1, "Expected EC_USERABORT.\n"); - todo_wine ok(IsWindow(hwnd), "Window should exist.\n"); + ok(IsWindow(hwnd), "Window should exist.\n"); ok(!IsWindowVisible(hwnd), "Window should be visible.\n"); hr = IMediaControl_Stop(control); diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c index 3983d43b08f..94210e043c7 100644 --- a/dlls/quartz/window.c +++ b/dlls/quartz/window.c @@ -20,6 +20,8 @@ #include "quartz_private.h" +#define WM_QUARTZ_DESTROY (WM_USER + WM_DESTROY) + WINE_DEFAULT_DEBUG_CHANNEL(quartz); static const WCHAR class_name[] = L"wine_quartz_window"; @@ -71,6 +73,12 @@ static LRESULT CALLBACK WndProcW(HWND hwnd, UINT message, WPARAM wparam, LPARAM if (window->default_dst) GetClientRect(window->hwnd, &window->dst); break; + case WM_QUARTZ_DESTROY: + DestroyWindow(hwnd); + return 0; + case WM_CLOSE: + IVideoWindow_put_Visible(&window->IVideoWindow_iface, OAFALSE); + return 0; } return DefWindowProcW(hwnd, message, wparam, lparam); @@ -1251,7 +1259,7 @@ void video_window_cleanup(struct video_window *window) * it would become top-level for a brief period before being destroyed. */ SetWindowLongW(window->hwnd, GWL_STYLE, GetWindowLongW(window->hwnd, GWL_STYLE) & ~WS_CHILD); - SendMessageW(window->hwnd, WM_CLOSE, 0, 0); + SendMessageW(window->hwnd, WM_QUARTZ_DESTROY, 0, 0); window->hwnd = NULL; } }