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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/575>
This commit is contained in:
Matthew Waters 2020-04-27 18:11:32 +10:00
parent 05108c2898
commit 7f6fb07f85

View file

@ -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))