summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_qpa.cpp
diff options
context:
space:
mode:
authorMorten Sorvig <morten.sorvig@nokia.com>2011-06-22 13:33:27 +0200
committerMorten Sorvig <morten.sorvig@nokia.com>2011-06-22 14:10:26 +0200
commitdef5901955e8b4cfcb9e2cd83c7dcf9ed0508a0a (patch)
treec5e5dd1e8ecfd1ff8acf48130909b0412f84b728 /src/opengl/qgl_qpa.cpp
parent0e4844aa243396aa2af4b89e94919854f142f52e (diff)
Reintroduce QWindow::SurfaceType
On Cocoa it makes sense to distinguish between the two window types. Reviewed-by: Samuel
Diffstat (limited to 'src/opengl/qgl_qpa.cpp')
-rw-r--r--src/opengl/qgl_qpa.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index 661f120601..7a4fb2c1a7 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -143,6 +143,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
winFormat.setAlphaBufferSize(qMax(winFormat.alphaBufferSize(), 8));
if (!widget->windowHandle()->handle()) {
+ widget->windowHandle()->setSurfaceType(QWindow::OpenGLSurface);
widget->windowHandle()->setFormat(winFormat);
widget->winId();//make window
}
@@ -294,6 +295,7 @@ QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *)
d->oldContext = const_cast<QGLContext *>(QGLContext::currentContext());
d->window = new QWindow;
+ d->window->setSurfaceType(QWindow::OpenGLSurface);
d->window->setGeometry(QRect(0, 0, 3, 3));
d->window->create();