diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-08-03 08:35:35 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-08-03 08:38:56 (GMT) |
commit | 44e11692549f1d6a4fed01066a06085dacfaa444 (patch) | |
tree | 2096e82429c0bcc406ff13bb16113cb999bef5cb /src/gui/kernel/qt_cocoa_helpers_mac.mm | |
parent | 1e4a54f0df3d2292d5f0490749ec2fb255912369 (diff) | |
download | Qt-44e11692549f1d6a4fed01066a06085dacfaa444.zip Qt-44e11692549f1d6a4fed01066a06085dacfaa444.tar.gz Qt-44e11692549f1d6a4fed01066a06085dacfaa444.tar.bz2 |
Cocoa: Active QDockWidget does not stay on top of inactive QDockWidget
If a window has several child windows, it was not be possible to
click on a child window to make it stack in front of the other
children. The reason is that cocoa held a fixed stacking order of
the child windows (sub-windows). This patch will release, and then
reestablish, the stacking order of the children upon acitvation.
Task-number: QTBUG-11780
Reviewed-by: prasanth
Diffstat (limited to 'src/gui/kernel/qt_cocoa_helpers_mac.mm')
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac.mm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 3fc27f4..647cb86 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1527,6 +1527,22 @@ void macSyncDrawingOnFirstInvocation(void * /*OSWindowRef */window) [theWindow display]; } } + +void qt_cocoaStackChildWindowOnTopOfOtherChildren(QWidget *childWidget) +{ + if (!childWidget) + return; + + QWidget *parent = childWidget->parentWidget(); + if (childWidget->isWindow() && parent) { + if ([[qt_mac_window_for(parent) childWindows] containsObject:qt_mac_window_for(childWidget)]) { + QWidgetPrivate *d = qt_widget_private(childWidget); + d->setSubWindowStacking(false); + d->setSubWindowStacking(true); + } + } +} + #endif // QT_MAC_USE_COCOA QT_END_NAMESPACE |