summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsbackingstore.cpp2
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp1
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp3
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglwindow.cpp1
4 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
index 1898cde886..eccb7f42c5 100644
--- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
@@ -192,8 +192,6 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion &region, const QPo
void QEglFSBackingStore::makeCurrent()
{
- // needed to prevent QOpenGLContext::makeCurrent() from failing
- window()->setSurfaceType(QSurface::OpenGLSurface);
(static_cast<QEglFSWindow *>(window()->handle()))->create();
m_context->makeCurrent(window());
}
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index 98c54e0ee0..9aece1ea83 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -59,6 +59,7 @@ QEglFSWindow::QEglFSWindow(QWindow *w)
#ifdef QEGL_EXTRA_DEBUG
qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_winid));
#endif
+ w->setSurfaceType(QSurface::OpenGLSurface);
}
QEglFSWindow::~QEglFSWindow()
diff --git a/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp b/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
index cb245f2e5c..db6e5d94da 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
+++ b/src/plugins/platforms/minimalegl/qminimaleglbackingstore.cpp
@@ -80,9 +80,6 @@ void QMinimalEglBackingStore::flush(QWindow *window, const QRegion &region, cons
void QMinimalEglBackingStore::beginPaint(const QRegion &)
{
- // needed to prevent QOpenGLContext::makeCurrent() from failing
- window()->setSurfaceType(QSurface::OpenGLSurface);
-
m_context->makeCurrent(window());
m_device = new QOpenGLPaintDevice(window()->size());
}
diff --git a/src/plugins/platforms/minimalegl/qminimaleglwindow.cpp b/src/plugins/platforms/minimalegl/qminimaleglwindow.cpp
index 13640b73d6..956b5470e5 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglwindow.cpp
+++ b/src/plugins/platforms/minimalegl/qminimaleglwindow.cpp
@@ -58,6 +58,7 @@ QMinimalEglWindow::QMinimalEglWindow(QWindow *w)
if (w->geometry() != screenGeometry) {
QWindowSystemInterface::handleGeometryChange(w, screenGeometry);
}
+ w->setSurfaceType(QSurface::OpenGLSurface);
}
void QMinimalEglWindow::setGeometry(const QRect &)