mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
gl/window_x11: avoid BadDrawable error on shutdown
This commit is contained in:
parent
f2bf233ce4
commit
e502311ce4
1 changed files with 5 additions and 0 deletions
|
@ -258,9 +258,14 @@ void
|
||||||
gst_gl_window_x11_close (GstGLWindow * window)
|
gst_gl_window_x11_close (GstGLWindow * window)
|
||||||
{
|
{
|
||||||
GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window);
|
GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window);
|
||||||
|
GstGLDisplay *display = window->display;
|
||||||
XEvent event;
|
XEvent event;
|
||||||
|
|
||||||
if (window_x11->device) {
|
if (window_x11->device) {
|
||||||
|
/* Avoid BadDrawable Errors... */
|
||||||
|
if (gst_gl_display_get_handle_type (display) & GST_GL_DISPLAY_TYPE_X11)
|
||||||
|
XSync (GST_GL_DISPLAY_X11 (display)->display, FALSE);
|
||||||
|
|
||||||
if (window_x11->internal_win_id)
|
if (window_x11->internal_win_id)
|
||||||
XUnmapWindow (window_x11->device, window_x11->internal_win_id);
|
XUnmapWindow (window_x11->device, window_x11->internal_win_id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue