Commit 5c8903a0 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

quartz: Clear the WS_CHILD style instead of unparenting the window.

parent 9e33f3f3
......@@ -4380,11 +4380,15 @@ static void test_window_threading(void)
else
skip("Could not find renderer window.\n");
SetActiveWindow(parent);
expect_parent_message = FALSE;
ref = IFilterGraph2_Release(graph);
ok(!ref, "Got outstanding refcount %d.\n", ref);
expect_parent_message = TRUE;
hwnd = GetActiveWindow();
ok(hwnd == parent, "Parent window lost focus, active window %p.\n", hwnd);
hr = CoCreateInstance(&CLSID_FilterGraphNoThread, NULL, CLSCTX_INPROC_SERVER,
&IID_IFilterGraph2, (void **)&graph);
ok(hr == S_OK, "Got hr %#x.\n", hr);
......
......@@ -136,14 +136,14 @@ HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This)
HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
{
BaseControlWindow *window = impl_from_BaseWindow(This);
if (!This->hWnd)
return S_OK;
/* Media Player Classic deadlocks if WM_PARENTNOTIFY is sent, so unparent
* the window first. */
IVideoWindow_put_Owner(&window->IVideoWindow_iface, 0);
/* Media Player Classic deadlocks if WM_PARENTNOTIFY is sent, so clear
* the child style first. Just like Windows, we don't actually unparent
* the window, to prevent extra focus events from being generated since
* it would become top-level for a brief period before being destroyed. */
SetWindowLongW(This->hWnd, GWL_STYLE, GetWindowLongW(This->hWnd, GWL_STYLE) & ~WS_CHILD);
SendMessageW(This->hWnd, WM_CLOSE, 0, 0);
This->hWnd = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment