diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2010-11-05 15:55:31 (GMT) |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2010-11-05 15:55:49 (GMT) |
commit | 61f173852fde779ad6b3860794180eb1c9ccd8d7 (patch) | |
tree | e184e53fa41ad7e5b57f6434ec0bd7ce9d4c7139 /src/gui/painting/qunifiedtoolbarsurface_mac.cpp | |
parent | 160928463dee6fbfcddabed6e172e81983b067fb (diff) | |
download | Qt-61f173852fde779ad6b3860794180eb1c9ccd8d7.zip Qt-61f173852fde779ad6b3860794180eb1c9ccd8d7.tar.gz Qt-61f173852fde779ad6b3860794180eb1c9ccd8d7.tar.bz2 |
Fix QMenu rendering in the unified toolbar
with the raster engine.
Task-number: QTBUG-12818
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/painting/qunifiedtoolbarsurface_mac.cpp')
-rw-r--r-- | src/gui/painting/qunifiedtoolbarsurface_mac.cpp | 11 |
1 files 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<QWidget *>(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) { |