Don't flush WA_DontShowOnScreen widgets.
authorMorten Johan Sorvig <morten.sorvig@nokia.com>
Fri, 4 May 2012 10:28:26 +0000 (12:28 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 4 May 2012 10:48:04 +0000 (12:48 +0200)
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 <samuel.rodal@nokia.com>
src/widgets/kernel/qwidgetbackingstore.cpp

index 2c9ad14..a697578 100644 (file)
@@ -104,6 +104,10 @@ static inline void qt_flush(QWidget *widget, const QRegion &region, 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