summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qunifiedtoolbarsurface_mac.cpp
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-11-05 15:55:31 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2010-11-05 15:55:49 (GMT)
commit61f173852fde779ad6b3860794180eb1c9ccd8d7 (patch)
treee184e53fa41ad7e5b57f6434ec0bd7ce9d4c7139 /src/gui/painting/qunifiedtoolbarsurface_mac.cpp
parent160928463dee6fbfcddabed6e172e81983b067fb (diff)
downloadQt-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.cpp11
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) {