summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-28 07:59:43 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-28 07:59:43 (GMT)
commit0d70b0a9faecf042fdb20e0056bdaaec289b851c (patch)
tree5ad6397fbab4dac6b37f740256aa585183e147c1 /src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
parentd45ec470519d1075ebf299b74cbb846a0c7d99af (diff)
parentce4996b624678f37b13fbb7db810cccd8970a889 (diff)
downloadQt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.zip
Qt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.tar.gz
Qt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts: src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'src/gui/kernel/qcocoasharedwindowmethods_mac_p.h')
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index 6254061..406e6d4 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -157,6 +157,20 @@ QT_END_NAMESPACE
[NSApp terminate:sender];
}
+- (void)setLevel:(NSInteger)windowLevel
+{
+ // Cocoa will upon activating/deactivating applications level modal
+ // windows up and down, regardsless of any explicit set window level.
+ // To ensure that modal stays-on-top dialogs actually stays on top after
+ // the application is activated (and therefore stacks in front of
+ // other stays-on-top windows), we need to add this little special-case override:
+ QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
+ if (widget && widget->isModal() && (widget->windowFlags() & Qt::WindowStaysOnTopHint))
+ [super setLevel:NSPopUpMenuWindowLevel];
+ else
+ [super setLevel:windowLevel];
+}
+
- (void)sendEvent:(NSEvent *)event
{
if ([event type] == NSApplicationDefined) {