From 5803bf9c714bbfc9ecdee8b4fa8ebf87d9bfc4f4 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Mon, 15 Nov 2010 16:19:02 +0100 Subject: Avoid the flushing of widgets that shouldn't show on screen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is mostly fixing errors appearing on the command-line when using native dialogs. Task-number: QTBUG-15169 Reviewed-by: Samuel Rødal --- src/gui/painting/qwindowsurface_raster.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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(widget->window()); -- cgit v0.12