From 7f6fb07f85d87a7e9ccd37966a49e22855516216 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 27 Apr 2020 18:11:32 +1000 Subject: [PATCH] qt/x11: also pass the window for gstgl -> qt context Removes this warning from Qt: QGLXContext: Multiple configs for FBConfig ID -1 QSGContext::initialize: depth buffer support missing, expect rendering errors Part-of: --- ext/qt/gstqtglutility.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/qt/gstqtglutility.cc b/ext/qt/gstqtglutility.cc index 2dd6b6ea0d..7c7e8e1d2e 100644 --- a/ext/qt/gstqtglutility.cc +++ b/ext/qt/gstqtglutility.cc @@ -307,9 +307,12 @@ qt_opengl_native_context_from_gst_gl_context (GstGLContext * context) #if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11) if (platform == GST_GL_PLATFORM_GLX) { GstGLDisplay *display = gst_gl_context_get_display (context); + GstGLWindow *window = gst_gl_context_get_window (context); Display *xdisplay = (Display *) gst_gl_display_get_handle (display); + Window win = gst_gl_window_get_window_handle (window); + gst_object_unref (window); gst_object_unref (display); - return QVariant::fromValue(QGLXNativeContext((GLXContext) handle, xdisplay)); + return QVariant::fromValue(QGLXNativeContext((GLXContext) handle, xdisplay, win)); } #endif #if GST_GL_HAVE_PLATFORM_EGL && (defined (HAVE_QT_WAYLAND) || defined (HAVE_QT_EGLFS) || defined (HAVE_QT_ANDROID))