diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 4 | ||||
-rw-r--r-- | src/opengl/qgl.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 8b8641f..3d2bfe2 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1275,9 +1275,9 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) //give potential windows a bigger "pre-initial" size; create_sys() will give them a new size later #ifdef Q_OS_SYMBIAN - if(q->inherits("QGLWidget")) { + if (isGLWidget) { // Don't waste GPU mem for unnecessary large egl surface - data.crect = parentWidget ? QRect(0,0,2,2) : QRect(0,0,2,2); + data.crect = QRect(0,0,2,2); } else { data.crect = parentWidget ? QRect(0,0,100,30) : QRect(0,0,360,640); } diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 51187cf..9e69816 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4445,6 +4445,11 @@ void QGLWidget::glDraw() Q_D(QGLWidget); if (!isValid()) return; +#ifdef Q_OS_SYMBIAN + // Crashes on Symbian if trying to render to invisible surfaces + if (!isVisible() && d->glcx->device()->devType() == QInternal::Widget) + return; +#endif makeCurrent(); #ifndef QT_OPENGL_ES if (d->glcx->deviceIsPixmap()) |