diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-06-21 10:21:46 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-06-21 10:23:28 +0200 |
commit | 14a1d6d3c799baf934912a0d9003a2358820cd86 (patch) | |
tree | 10e2691627cfeed3d83b44404f5a3116b4f2f47f /src/plugins/platforms/wayland | |
parent | 31b231181860b258aab7d142623221688f2445b8 (diff) |
Make readback-glx working again in wayland.
Diffstat (limited to 'src/plugins/platforms/wayland')
-rw-r--r-- | src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp index df55caab76..c7f00280a6 100644 --- a/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp +++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.cpp @@ -49,8 +49,9 @@ QWaylandReadbackGlxWindow::QWaylandReadbackGlxWindow(QWindow *window, QWaylandRe , m_glxIntegration(glxIntegration) , m_buffer(0) , m_pixmap(0) - , m_config(qglx_findConfig(glxIntegration->xDisplay(), glxIntegration->screen(), window->glFormat())) + , m_config(0) , m_glxPixmap(0) + , m_window(window) { } @@ -107,6 +108,9 @@ void QWaylandReadbackGlxWindow::createSurface() m_pixmap = XCreatePixmap(m_glxIntegration->xDisplay(), m_glxIntegration->rootWindow(), size.width(), size.height(), depth); XSync(m_glxIntegration->xDisplay(), False); + if (!m_config) + m_config = qglx_findConfig(m_glxIntegration->xDisplay(), m_glxIntegration->screen(), m_window->glFormat()); + m_glxPixmap = glXCreatePixmap(m_glxIntegration->xDisplay(), m_config, m_pixmap,0); if (!m_glxPixmap) diff --git a/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h index 60b22a4408..4f753c660b 100644 --- a/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h +++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/qwaylandreadbackglxwindow.h @@ -69,6 +69,7 @@ private: Pixmap m_pixmap; GLXFBConfig m_config; GLXPixmap m_glxPixmap; + QWindow *m_window; }; #endif // QWAYLANDREADBACKGLXWINDOW_H |