summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp')
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
index 36503f4a7c..8ae83b8084 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
@@ -53,17 +53,15 @@ QXcbGlxWindow::~QXcbGlxWindow()
{
}
-void QXcbGlxWindow::resolveFormat()
-{
- m_format = window()->requestedFormat(); //qglx_findVisualInfo sets the resovled format
-}
-
-void *QXcbGlxWindow::createVisual()
+const xcb_visualtype_t *QXcbGlxWindow::createVisual()
{
QXcbScreen *scr = xcbScreen();
if (!scr)
return Q_NULLPTR;
- return qglx_findVisualInfo(DISPLAY_FROM_XCB(scr), scr->screenNumber(), &m_format);
+ XVisualInfo *visualInfo = qglx_findVisualInfo(DISPLAY_FROM_XCB(scr), scr->screenNumber(), &m_format);
+ const xcb_visualtype_t *xcb_visualtype = scr->visualForId(visualInfo->visualid);
+ XFree(visualInfo);
+ return xcb_visualtype;
}
QT_END_NAMESPACE