From def5901955e8b4cfcb9e2cd83c7dcf9ed0508a0a Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Wed, 22 Jun 2011 13:33:27 +0200 Subject: Reintroduce QWindow::SurfaceType On Cocoa it makes sense to distinguish between the two window types. Reviewed-by: Samuel --- src/opengl/qgl_qpa.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/opengl/qgl_qpa.cpp') 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::currentContext()); d->window = new QWindow; + d->window->setSurfaceType(QWindow::OpenGLSurface); d->window->setGeometry(QRect(0, 0, 3, 3)); d->window->create(); -- cgit v1.2.3