summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r--src/plugins/platforms/qnx/qqnxeglwindow.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.cpp b/src/plugins/platforms/qnx/qqnxeglwindow.cpp
index aa2e4db193..33ce0f924c 100644
--- a/src/plugins/platforms/qnx/qqnxeglwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxeglwindow.cpp
@@ -140,11 +140,17 @@ EGLSurface QQnxEglWindow::getSurface()
if (m_newSurfaceRequested.testAndSetOrdered(true, false)) {
const QMutexLocker locker(&m_mutex); //Set geomety must not reset the requestedBufferSize till
//the surface is created
- if (m_eglSurface != EGL_NO_SURFACE) {
- platformOpenGLContext()->doneCurrent();
- destroyEGLSurface();
+
+ if ((m_requestedBufferSize != bufferSize()) || (m_eglSurface == EGL_NO_SURFACE)) {
+ if (m_eglSurface != EGL_NO_SURFACE) {
+ platformOpenGLContext()->doneCurrent();
+ destroyEGLSurface();
+ }
+ createEGLSurface();
+ } else {
+ // Must've been a sequence of unprocessed changes returning us to the original size.
+ resetBuffers();
}
- createEGLSurface();
}
return m_eglSurface;