gl: win32: Unparent internal window before destroying it

For some reason DestroyWindow() deadlock if it's called from
parent window's KeyPress event.

https://bugzilla.gnome.org/show_bug.cgi?id=766533
This commit is contained in:
Xavier Claessens 2016-05-16 17:11:53 -04:00 committed by Tim-Philipp Müller
parent e2731f35bf
commit 719298af98

View file

@ -135,6 +135,8 @@ gst_gl_window_win32_close (GstGLWindow * window)
if (window_win32->internal_win_id) {
RemoveProp (window_win32->internal_win_id, "gl_window");
ShowWindow (window_win32->internal_win_id, SW_HIDE);
SetParent (window_win32->internal_win_id, NULL);
if (!DestroyWindow (window_win32->internal_win_id))
GST_WARNING ("failed to destroy window %" G_GUINTPTR_FORMAT
", 0x%x", (guintptr) window_win32->internal_win_id,