diff options
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetbackingstore.cpp | 9 |
2 files changed, 4 insertions, 12 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index bf339ca5c5..f5cc6bb853 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5520,9 +5520,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP } 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())) + if (backingStore) backingStore->markDirtyOnScreen(rgn, q, offset); return; @@ -5641,8 +5639,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP sendPaintEvent(toBePainted); } - // Native widgets need to be marked dirty on screen so painting will be done in correct context - if (backingStore && !onScreen && !asRoot && (q->internalWinId() || (q->nativeParentWidget() && !q->nativeParentWidget()->isWindow()))) + if (backingStore) backingStore->markDirtyOnScreen(toBePainted, q, offset); //restore diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 24b8665013..b9505a6ed0 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -333,9 +333,6 @@ void QWidgetBackingStore::beginPaint(QRegion &toClean, QWidget *widget, QBacking Q_UNUSED(widget); Q_UNUSED(toCleanIsInTopLevelCoordinates); - // Always flush repainted areas. - dirtyOnScreen += toClean; - #ifdef QT_NO_PAINT_DEBUG backingStore->beginPaint(toClean); #else @@ -714,8 +711,7 @@ void QWidgetBackingStore::markDirtyOnScreen(const QRegion ®ion, QWidget *widg // Top-level. if (widget == tlw) { - if (!widget->testAttribute(Qt::WA_WState_InPaintEvent)) - dirtyOnScreen += region; + dirtyOnScreen += region; return; } @@ -723,8 +719,7 @@ void QWidgetBackingStore::markDirtyOnScreen(const QRegion ®ion, QWidget *widg if (!hasPlatformWindow(widget) && !widget->isWindow()) { QWidget *nativeParent = widget->nativeParentWidget(); // Alien widgets with the top-level as the native parent (common case). if (nativeParent == tlw) { - if (!widget->testAttribute(Qt::WA_WState_InPaintEvent)) - dirtyOnScreen += region.translated(topLevelOffset); + dirtyOnScreen += region.translated(topLevelOffset); return; } |