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/qapplication.cpp | |
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/qapplication.cpp')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 5c333b0..3303800 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2540,6 +2540,13 @@ void QApplication::setActiveWindow(QWidget* act) sendSpontaneousEvent(w, &activationChange); } +#ifdef QT_MAC_USE_COCOA + // In case the user clicked on a child window, we need to + // reestablish the stacking order of the window so + // it pops in front of other child windows in cocoa: + qt_cocoaStackChildWindowOnTopOfOtherChildren(window); +#endif + for(int i = 0; i < toBeDeactivated.size(); ++i) { QWidget *w = toBeDeactivated.at(i); sendSpontaneousEvent(w, &windowDeactivate); |