summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2011-04-06 09:07:08 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2011-04-06 11:15:08 (GMT)
commit32228c4f2b3419a35d1623377050ef72edf73c92 (patch)
treea758a585ecd8d07d221fb09cc1173eeeb4170639 /src/corelib
parent2e0b5644e17f22ef3fc24ce4c762449149b24af6 (diff)
downloadQt-32228c4f2b3419a35d1623377050ef72edf73c92.zip
Qt-32228c4f2b3419a35d1623377050ef72edf73c92.tar.gz
Qt-32228c4f2b3419a35d1623377050ef72edf73c92.tar.bz2
Cocoa: p1 bug fix: revert use of subWindowStacking
This reverts commit 3c2373d7ea9bc91bb537c0725984d19ad0fbab01. After finding yet another bug related to cocoa child windows (QTBUG-17738), we have no other option than to admit it was a wrong move to use the API in the first place. Had we only known how many side-effects and hidden bugs it would introduce. The original problem we tried to solve were the cases where a stays-on-top parent window executed a modal child dialog. This child should always stay on top of its parent, but Cocoa would insist on pushing the window down to the modal window level upon activating/deactivating the application. Some window systems will always stack a window child on top of the parent, while others (X11) seems to be more selective on this issue. On Mac, we already stack windows a bit differently, thinking first and foremost on tool windows. Since this change is going into a patch release (which is debatable, since this changes behaviour, but p1 is a p1), we choose to add in a backdoor for those users who by chance depend on this behaviour. Setting the env var QT_MAC_USE_CHILDWINDOWS=1 will give you the old code path, but we plan to remove this for Qt-4.8. Also, this patch does fix the original bug described above by overriding the setLevel method in NSWindow, and refuse Cocoa to level down stays-on-top modal windows.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qnamespace.h1
-rw-r--r--src/corelib/global/qnamespace.qdoc8
2 files changed, 0 insertions, 9 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 864d4a5..4d70744 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -525,7 +525,6 @@ public:
#endif
WA_X11DoNotAcceptFocus = 132,
- WA_MacNoCocoaChildWindow = 133,
// Add new attributes before this line
WA_AttributeCount
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 224d9b6..a79411b 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -981,14 +981,6 @@
the brushed metal style as supported by the windowing system. This
attribute is only applicable to Mac OS X.
- \value WA_MacNoCocoaChildWindow Indicates the widget should not be added
- as a Cocoa child window of it's parent window. This will free the window
- from being moved around together with the parent. However, this
- will also allow it to stack/hide behind it's parent (if they are on
- the same window level, e.g both windows are dialogs). This can cause problems if
- both windows are modal, as the child can then block input to the parent
- while hiding behind it. This attribute is only applicable to Mac OS X.
-
\omitvalue WA_MacMetalStyle
\value WA_Mapped Indicates that the widget is mapped on screen.