From 210cf85fdc77b91b02b02fe1449d90f91f3dd167 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 14 Jul 2021 16:09:41 -0400 Subject: [PATCH] gl: x11: Issue XSync to close our top level window This is similar action as when the window handle is modified, we now issue XSync whenever we destroy our internal window. This ensure that the window is properly closed before the connecgtion is dropped. Fixes #815 Part-of: --- gst-libs/gst/gl/x11/gstglwindow_x11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c b/gst-libs/gst/gl/x11/gstglwindow_x11.c index 960d39fb81..7ee1deda35 100644 --- a/gst-libs/gst/gl/x11/gstglwindow_x11.c +++ b/gst-libs/gst/gl/x11/gstglwindow_x11.c @@ -271,6 +271,9 @@ gst_gl_window_x11_close (GstGLWindow * window) XUnmapWindow (window_x11->device, window_x11->internal_win_id); XDestroyWindow (window_x11->device, window_x11->internal_win_id); + + /* Ensure everything is sent immediatly */ + XSync (window_x11->device, FALSE); } XFree (window_x11->visual_info);