From: Morten Johan Sorvig Date: Fri, 4 May 2012 10:28:26 +0000 (+0200) Subject: Don't flush WA_DontShowOnScreen widgets. X-Git-Tag: 071012110112~1208 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=276776f50369580f33ec01b22aa928e48358a0f7;p=profile%2Fivi%2Fqtbase.git Don't flush WA_DontShowOnScreen widgets. QBackingStore::flush expects that windows have gotten expose events before flush is called. Not on screen -> no expose events -> don't call flush. Change-Id: Id868888566fe672939f3c5775f9f371fb3240ee8 Reviewed-by: Samuel Rødal --- diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 2c9ad14..a697578 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -104,6 +104,10 @@ static inline void qt_flush(QWidget *widget, const QRegion ®ion, QBackingStor frames = 0; } } + + if (tlw->testAttribute(Qt::WA_DontShowOnScreen) || widget->testAttribute(Qt::WA_DontShowOnScreen)) + return; + if (widget != tlw) backingStore->flush(region, widget->windowHandle(), tlwOffset + widget->mapTo(tlw, QPoint())); else