diff options
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index e8169d0bd1..308403175a 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -271,6 +271,9 @@ QWidgetPrivate::QWidgetPrivate(int version) #ifndef QT_NO_IM , inheritsInputMethodHints(0) #endif +#ifndef QT_NO_OPENGL + , renderToTextureReallyDirty(1) +#endif #if defined(Q_OS_WIN) , noPaintOnScreen(0) #endif @@ -5560,7 +5563,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP << "geometry ==" << QRect(q->mapTo(q->window(), QPoint(0, 0)), q->size()); #endif - bool grabbed = false; + bool skipPaintEvent = false; #ifndef QT_NO_OPENGL if (renderToTexture) { // This widget renders into a texture which is composed later. We just need to @@ -5574,14 +5577,18 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP } else { // We are not drawing to a backingstore: fall back to QImage p.drawImage(q->rect(), grabFramebuffer()); - grabbed = true; + skipPaintEvent = true; } endBackingStorePainting(); } + if (renderToTextureReallyDirty) + renderToTextureReallyDirty = 0; + else + skipPaintEvent = true; } #endif // QT_NO_OPENGL - if (!grabbed) { + if (!skipPaintEvent) { //actually send the paint event sendPaintEvent(toBePainted); } |