From 3d0c2db1673c2d594014712030ed3f5217969872 Mon Sep 17 00:00:00 2001 From: Inho Lee Date: Fri, 5 Nov 2021 13:35:55 +0100 Subject: Don't keep eglConfig in hardwareintegration There is no reason to keep eglConfig value as a member variable. Even this can result in creating wrong surface from the current surface. And it makes no sense to change alpha bits of the surface format by supporting decorations. Task-number: QTBUG-97916 Change-Id: Iaa395d36e83373ea197dc5e14424fcb62cd2cd8b (cherry picked from commit af884d4aac18e5155649f8a916ea272c11542b7e) Reviewed-by: Qt CI Bot Reviewed-by: Seokha Ko Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp') diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp index e76bc940..4e7d9f13 100644 --- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp +++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp @@ -54,7 +54,6 @@ namespace QtWaylandClient { QWaylandXCompositeGLXWindow::QWaylandXCompositeGLXWindow(QWindow *window, QWaylandXCompositeGLXIntegration *glxIntegration) : QWaylandWindow(window, glxIntegration->waylandDisplay()) , m_glxIntegration(glxIntegration) - , m_config(qglx_findConfig(glxIntegration->xDisplay(), glxIntegration->screen(), window->format(), GLX_WINDOW_BIT | GLX_PIXMAP_BIT)) { } @@ -95,7 +94,8 @@ void QWaylandXCompositeGLXWindow::createSurface() return; } - XVisualInfo *visualInfo = glXGetVisualFromFBConfig(m_glxIntegration->xDisplay(), m_config); + GLXFBConfig glxConfig = qglx_findConfig(m_glxIntegration->xDisplay(), m_glxIntegration->screen(), window()->format(), GLX_WINDOW_BIT | GLX_PIXMAP_BIT); + XVisualInfo *visualInfo = glXGetVisualFromFBConfig(m_glxIntegration->xDisplay(), glxConfig); Colormap cmap = XCreateColormap(m_glxIntegration->xDisplay(), m_glxIntegration->rootWindow(), visualInfo->visual, AllocNone); -- cgit v1.2.1