summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 370ae2aed1..b465ac36c7 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5611,13 +5611,15 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
// punch a hole in the backingstore, so the texture will be visible.
if (!q->testAttribute(Qt::WA_AlwaysStackOnTop)) {
beginBackingStorePainting();
- QPainter p(q);
if (backingStore) {
+ QPainter p(q);
p.setCompositionMode(QPainter::CompositionMode_Source);
p.fillRect(q->rect(), Qt::transparent);
} else {
+ QImage img = grabFramebuffer();
+ QPainter p(q);
// We are not drawing to a backingstore: fall back to QImage
- p.drawImage(q->rect(), grabFramebuffer());
+ p.drawImage(q->rect(), img);
skipPaintEvent = true;
}
endBackingStorePainting();