From 3ad35ffdbfcbd2db5e8aac95fa0cc9f80e372128 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Tue, 4 Jan 2011 10:28:20 +0100 Subject: Pre-create the GL share widget before window surface creation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not pixmap creation. Merge-request: 988 Reviewed-by: Samuel Rødal --- src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index 4a86082..b1a8f5f7 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -75,6 +75,8 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem() QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const { + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QMeeGoGraphicsSystem::surfaceWasCreated = true; QWindowSurface *surface = new QGLWindowSurface(widget); return surface; @@ -82,12 +84,6 @@ QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const QPixmapData *QMeeGoGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const { - // Long story short: without this it's possible to hit an - // uninitialized paintDevice due to a Qt bug too complex to even - // explain here... not to mention fix without going crazy. - // MDK - QGLShareContextScope ctx(qt_gl_share_widget()->context()); - return new QRasterPixmapData(type); } -- cgit v0.12