summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/opengl/qwindowsurface_gl.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 6185ff8..ea5e9a7 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -401,11 +401,6 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
if (widgetPrivate->extraData()->glContext)
return;
-#ifdef Q_WS_QPA
- QGLContext *ctx = QGLContext::fromPlatformGLContext(widget->platformWindow()->glContext());
- if (!d_ptr->fbo && d_ptr->tried_fbo)
- d_ptr->ctx = ctx;
-#else
QGLContext *ctx = NULL;
// For translucent top-level widgets we need alpha in the format.
@@ -418,8 +413,7 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
} else
ctx = new QGLContext(surfaceFormat, widget);
- ctx->create(qt_gl_share_widget()->context());
-#endif
+ ctx->create(qt_gl_share_context());
#ifndef QT_NO_EGL
static bool checkedForNOKSwapRegion = false;