QNX: Recreate EGL surface when the window geometry changes
Change-Id: Ic578e9c3f4d8f70bcac0d95f59942cd2724aee51 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
This commit is contained in:
parent
b283213712
commit
425c902ed0
@ -188,6 +188,22 @@ void QQnxWindow::setGeometry(const QRect &rect)
|
||||
qFatal("QQnxWindow: failed to set window source size, errno=%d", errno);
|
||||
}
|
||||
|
||||
if (m_platformOpenGLContext != 0 && bufferSize() != rect.size()) {
|
||||
bool restoreCurrent = false;
|
||||
|
||||
if (m_platformOpenGLContext->isCurrent()) {
|
||||
m_platformOpenGLContext->doneCurrent();
|
||||
restoreCurrent = true;
|
||||
}
|
||||
|
||||
m_platformOpenGLContext->destroySurface();
|
||||
setBufferSize(rect.size());
|
||||
m_platformOpenGLContext->createSurface(this);
|
||||
|
||||
if (restoreCurrent)
|
||||
m_platformOpenGLContext->makeCurrent(this);
|
||||
}
|
||||
|
||||
QWindowSystemInterface::handleGeometryChange(window(), rect);
|
||||
|
||||
// Now move all children.
|
||||
|
Loading…
Reference in New Issue
Block a user