[vlc-commits] win32:vout_window: remove unneeded DestroyWindow
Steve Lhomme
git at videolan.org
Tue Feb 4 16:07:31 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb 4 14:56:45 2020 +0100| [a425b09d72d9576d34adffcd7f1dbd322337dda8] | committer: Steve Lhomme
win32:vout_window: remove unneeded DestroyWindow
The WM_CLOSE posted just above will call DestroyWindow in the event-loop thread.
https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-close
Also DestroyWindow should be called from the thread that created the HWND, which
is the EventThread, not the thread with the Open/Close.
See remarks in https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-destroywindow
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a425b09d72d9576d34adffcd7f1dbd322337dda8
---
modules/video_output/win32/window.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/modules/video_output/win32/window.c b/modules/video_output/win32/window.c
index 7a91c5dc05..e53380de32 100644
--- a/modules/video_output/win32/window.c
+++ b/modules/video_output/win32/window.c
@@ -493,8 +493,6 @@ static void Close(vout_window_t *wnd)
vlc_cond_wait( &sys->wait, &sys->lock );
}
vlc_mutex_unlock( &sys->lock );
-
- DestroyWindow( sys->hwnd );
}
vlc_join(sys->thread, NULL);
vlc_mutex_destroy( &sys->lock );
More information about the vlc-commits
mailing list