From c6e32b740ca7893e74c97b38073dbc7cf0ae0a97 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 31 Jul 2013 14:20:37 +0200 Subject: 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 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoawindow.mm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') 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(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(transientParent->handle()) : 0; + if (transientParentWindow) + windowLevel = qMax([transientParentWindow->m_nsWindow level], windowLevel); + } return windowLevel; } -- cgit v1.2.3