Gabriel Ivăncescu : strmbase: Detach the window from the parent before destroying it.

Alexandre Julliard julliard at winehq.org
Wed Jan 15 16:26:47 CST 2020


Module: wine
Branch: master
Commit: 54d82d80d738cddb95f925189b8937e37a1a85c9
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=54d82d80d738cddb95f925189b8937e37a1a85c9

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Wed Jan 15 00:14:37 2020 -0600

strmbase: Detach the window from the parent before destroying it.

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/strmbase/window.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c
index 07a12eca26..963c7f2b02 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, 0);
+
     SendMessageW(This->hWnd, WM_CLOSE, 0, 0);
     This->hWnd = NULL;
 




More information about the wine-cvs mailing list