summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qwindowsurface_raster.cpp
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-11-15 15:19:02 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2010-11-15 15:20:29 (GMT)
commit5803bf9c714bbfc9ecdee8b4fa8ebf87d9bfc4f4 (patch)
tree2c16f01f1aba19c0402b200f1c1d5f5956b68844 /src/gui/painting/qwindowsurface_raster.cpp
parentd96aa02b46f4ff999d4353d8cd7a56ac426e58e0 (diff)
downloadQt-5803bf9c714bbfc9ecdee8b4fa8ebf87d9bfc4f4.zip
Qt-5803bf9c714bbfc9ecdee8b4fa8ebf87d9bfc4f4.tar.gz
Qt-5803bf9c714bbfc9ecdee8b4fa8ebf87d9bfc4f4.tar.bz2
Avoid the flushing of widgets that shouldn't show on screen.
This is mostly fixing errors appearing on the command-line when using native dialogs. Task-number: QTBUG-15169 Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/painting/qwindowsurface_raster.cpp')
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index 217723f..ae73d7d 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -251,6 +251,11 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
#ifdef Q_WS_MAC
+ // This is mainly done for native components like native "open file" dialog.
+ if (widget->testAttribute(Qt::WA_DontShowOnScreen)) {
+ return;
+ }
+
#ifdef QT_MAC_USE_COCOA
// Unified toolbar hack.
QMainWindow* mWindow = qobject_cast<QMainWindow*>(widget->window());