[PATCH v4 1/2] strmbase: Detach the window from the parent before destroying it.
Zebediah Figura
z.figura12 at gmail.com
Wed Jan 15 00:14:37 CST 2020
From: Gabriel Ivăncescu <gabrielopcode at gmail.com>
This fixes a regression introduced by 3b5198c8283d891095612c1001edb5e5788d6059.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
Resent with minor changes in style and wording.
dlls/strmbase/window.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c
index 07a12eca26..71bbf73ccc 100644
--- a/dlls/strmbase/window.c
+++ b/dlls/strmbase/window.c
@@ -136,9 +136,15 @@ 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, (OAHWND)NULL);
+
SendMessageW(This->hWnd, WM_CLOSE, 0, 0);
This->hWnd = NULL;
--
2.25.0
More information about the wine-devel
mailing list