summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxeglwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxeglwindow.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxeglwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.cpp b/src/plugins/platforms/qnx/qqnxeglwindow.cpp
index 1aad25a418..5892252a5b 100644
--- a/src/plugins/platforms/qnx/qqnxeglwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxeglwindow.cpp
@@ -134,6 +134,8 @@ void QQnxEglWindow::swapEGLBuffers()
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();
@@ -165,7 +167,6 @@ void QQnxEglWindow::setGeometry(const QRect &rect)
QSize QQnxEglWindow::requestedBufferSize() const
{
- const QMutexLocker locker(&m_mutex);
return m_requestedBufferSize;
}
@@ -213,7 +214,6 @@ int QQnxEglWindow::pixelFormat() const
void QQnxEglWindow::resetBuffers()
{
- const QMutexLocker locker(&m_mutex);
m_requestedBufferSize = QSize();
}