Fix build when using -egl and -no-xcb-xlib
Change-Id: I533f1d989b5f4b427ce572620e27c3870a64c2ae Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
This commit is contained in:
parent
9b4fbe85d2
commit
7aadf03fea
@ -66,7 +66,11 @@ bool QXcbEglIntegration::initialize(QXcbConnection *connection)
|
||||
{
|
||||
m_connection = connection;
|
||||
|
||||
#ifdef USE_XCB_XLIB
|
||||
Display *dpy = (Display *)m_connection->xlib_display();
|
||||
#else
|
||||
EGLNativeDisplayType dpy = EGL_DEFAULT_DISPLAY;
|
||||
#endif
|
||||
m_egl_display = eglGetDisplay(dpy);
|
||||
|
||||
EGLint major, minor;
|
||||
|
@ -1155,10 +1155,12 @@ xcb_window_t QXcbConnection::rootWindow()
|
||||
return primaryScreen()->root();
|
||||
}
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
void *QXcbConnection::xlib_display() const
|
||||
{
|
||||
return m_xlib_display;
|
||||
}
|
||||
#endif
|
||||
|
||||
void QXcbConnection::processXcbEvents()
|
||||
{
|
||||
|
@ -328,6 +328,7 @@ void QXcbWindow::create()
|
||||
|
||||
resolveFormat();
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) {
|
||||
XVisualInfo *visualInfo = static_cast<XVisualInfo *>(createVisual());
|
||||
if (!visualInfo && window()->surfaceType() == QSurface::OpenGLSurface)
|
||||
@ -359,6 +360,7 @@ void QXcbWindow::create()
|
||||
XFree(visualInfo);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!m_window)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user