summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-17 19:33:01 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-17 19:33:01 (GMT)
commitdd67b26734af6ebf83ef3b1be949631120846e59 (patch)
tree59fbaf56cd07e93605192af47376dbfb866dd48d /src/gui/kernel
parentb53107577d64f4a3694a2184a3ccc87ed3aed3f2 (diff)
parent749ad26d255327c9fa3fe857a30983cc6dfef0d9 (diff)
downloadQt-dd67b26734af6ebf83ef3b1be949631120846e59.zip
Qt-dd67b26734af6ebf83ef3b1be949631120846e59.tar.gz
Qt-dd67b26734af6ebf83ef3b1be949631120846e59.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Cocoa: revert parts of cc6dc0aeefde881a95f5fea2b26f2f3d7bdc6e15 Cocoa, Autotest: disable autotest that was added a bit premature make error messages consistent Add tests/benchmarks/README qgrayraster: Remove unnecessary indirection in QT_FT_Outline_Decompose Cocoa: add autotest to be more safe regarding child window stacking Fix compilation: QT_NO_TEXTSTREAM exclude QtXmlPatterns from the completeness assessment fix QMAKE_SUBSTITUTES with shadow builds Outline / fill inconsistency in X11 paint engine. Cocoa: parent windows shows on screen when they should be hidden Prevented Xorg crash in qtdemo when running corkboards example.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_mac.mm18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 8ae6a99..1979c84 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2796,10 +2796,14 @@ void QWidgetPrivate::setSubWindowStacking(bool set)
if (QWidget *parent = q->parentWidget()) {
if (parent->testAttribute(Qt::WA_WState_Created)) {
- if (set)
- [qt_mac_window_for(parent) addChildWindow:qt_mac_window_for(q) ordered:NSWindowAbove];
- else
+ if (set) {
+ if (parent->isVisible()) {
+ NSWindow *childwin = qt_mac_window_for(q);
+ [qt_mac_window_for(parent) addChildWindow:childwin ordered:NSWindowAbove];
+ }
+ } else {
[qt_mac_window_for(parent) removeChildWindow:qt_mac_window_for(q)];
+ }
}
}
@@ -2807,10 +2811,12 @@ void QWidgetPrivate::setSubWindowStacking(bool set)
for (int i=0; i<widgets.size(); ++i) {
QWidget *child = widgets.at(i);
if (child->isWindow() && child->testAttribute(Qt::WA_WState_Created) && child->isVisibleTo(q)) {
- if (set)
- [qt_mac_window_for(q) addChildWindow:qt_mac_window_for(child) ordered:NSWindowAbove];
- else
+ if (set) {
+ NSWindow *childwin = qt_mac_window_for(child);
+ [qt_mac_window_for(q) addChildWindow:childwin ordered:NSWindowAbove];
+ } else {
[qt_mac_window_for(q) removeChildWindow:qt_mac_window_for(child)];
+ }
}
}
}