summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-07-31 14:20:37 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-02 18:20:09 +0200
commitc6e32b740ca7893e74c97b38073dbc7cf0ae0a97 (patch)
tree39ac5c6533d55e2dcefa834772f6b79497641fd1 /src/plugins
parentb59c257a04f16dfefc6a7a8a1a920a8277db1326 (diff)
OSX: do not force a plain window to be on the same level as its parent
2af0a778f464980594c36098e4a8ba4448edfd29 the fix for QTBUG-27410 caused this Designer bug. Doing the automatic level escalation only for "special" windows and avoiding it for plain Qt::Window type windows is one way of fixing the Designer problem. Task-number: QTBUG-31779 Change-Id: I1da5454f31111f36480fac3b53be6d5f0ce40047 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index bba5b6fdf1..1126315126 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -423,11 +423,13 @@ NSInteger QCocoaWindow::windowLevel(Qt::WindowFlags flags)
if (type == Qt::ToolTip)
windowLevel = NSScreenSaverWindowLevel;
- // A window should be in at least the same level as its parent.
- const QWindow * const transientParent = window()->transientParent();
- const QCocoaWindow * const transientParentWindow = transientParent ? static_cast<QCocoaWindow *>(transientParent->handle()) : 0;
- if (transientParentWindow)
- windowLevel = qMax([transientParentWindow->m_nsWindow level], windowLevel);
+ // Any "special" window should be in at least the same level as its parent.
+ if (type != Qt::Window) {
+ const QWindow * const transientParent = window()->transientParent();
+ const QCocoaWindow * const transientParentWindow = transientParent ? static_cast<QCocoaWindow *>(transientParent->handle()) : 0;
+ if (transientParentWindow)
+ windowLevel = qMax([transientParentWindow->m_nsWindow level], windowLevel);
+ }
return windowLevel;
}