summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-12-03 13:00:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-03 15:14:03 +0100
commitcac6c860c00558b9692986a1c07e505dd334cc33 (patch)
tree9afd6bf054fb2875a1d0d8f11d1f2b80f0b68bda /src
parent1f6c4a514c6bbc9bdc50aff4c0079ffccfffe76f (diff)
Effects also need to markDirtyOnScreen for native widgets
Task-number: QTBUG-33244 Change-Id: I95427b1fd6edaafe99738acfec28f6fd37b70cde Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 421ce57096..c646255ddb 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5036,6 +5036,8 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
return;
#endif // Q_WS_MAC
+ const bool asRoot = flags & DrawAsRoot;
+ bool onScreen = paintOnScreen();
Q_Q(QWidget);
#ifndef QT_NO_GRAPHICSEFFECT
@@ -5065,12 +5067,17 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
sharedPainter->restore();
}
sourced->context = 0;
+
+ // Native widgets need to be marked dirty on screen so painting will be done in correct context
+ // Same check as in the no effects case below.
+ if (backingStore && !onScreen && !asRoot && (q->internalWinId() || !q->nativeParentWidget()->isWindow()))
+ backingStore->markDirtyOnScreen(rgn, q, offset);
+
return;
}
}
#endif //QT_NO_GRAFFICSEFFECT
- const bool asRoot = flags & DrawAsRoot;
const bool alsoOnScreen = flags & DrawPaintOnScreen;
const bool recursive = flags & DrawRecursive;
const bool alsoInvisible = flags & DrawInvisible;
@@ -5084,7 +5091,6 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
subtractOpaqueChildren(toBePainted, q->rect());
if (!toBePainted.isEmpty()) {
- bool onScreen = paintOnScreen();
if (!onScreen || alsoOnScreen) {
//update the "in paint event" flag
if (q->testAttribute(Qt::WA_WState_InPaintEvent))