From 61f173852fde779ad6b3860794180eb1c9ccd8d7 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Fri, 5 Nov 2010 16:55:31 +0100 Subject: Fix QMenu rendering in the unified toolbar with the raster engine. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-12818 Reviewed-by: Samuel Rødal --- src/gui/painting/qunifiedtoolbarsurface_mac.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qunifiedtoolbarsurface_mac.cpp b/src/gui/painting/qunifiedtoolbarsurface_mac.cpp index 3590993..b25757b 100644 --- a/src/gui/painting/qunifiedtoolbarsurface_mac.cpp +++ b/src/gui/painting/qunifiedtoolbarsurface_mac.cpp @@ -76,9 +76,14 @@ void QUnifiedToolbarSurface::recursiveRedirect(QObject *object, const QPoint &of if (object != 0) { if (object->isWidgetType()) { QWidget *widget = qobject_cast(object); - widget->d_func()->unifiedSurface = this; - widget->d_func()->isInUnifiedToolbar = true; - widget->d_func()->toolbar_offset = offset; + + // We redirect the painting only if the widget is in the same window + // and is not a window in itself. + if (!(widget->windowType() & Qt::Window)) { + widget->d_func()->unifiedSurface = this; + widget->d_func()->isInUnifiedToolbar = true; + widget->d_func()->toolbar_offset = offset; + } } for (int i = 0; i < object->children().size(); ++i) { -- cgit v0.12