Upgrade Window Level for stay on top widget on OS X

Currently setting the WindowStaysOnTopHint makes the window appear over
its children e.g. a QMessageBox.

This patch aims to provide a more sensible level for stay on top widget

[ChangeLog][QtWidget][OS X] Fixes an issue where stay on top widgets
would cover their own children

Task-number: QTBUG-36178
Change-Id: Ie86b0e0244d2fdee3638d4ab576445ef190d4bc6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Samuel Gaist 2014-01-29 23:30:00 +01:00 committed by The Qt Project
parent 8cf666e10c
commit 85ff4e8fe4

View File

@ -449,7 +449,7 @@ NSInteger QCocoaWindow::windowLevel(Qt::WindowFlags flags)
// StayOnTop window should appear above Tool windows. // StayOnTop window should appear above Tool windows.
if (flags & Qt::WindowStaysOnTopHint) if (flags & Qt::WindowStaysOnTopHint)
windowLevel = NSPopUpMenuWindowLevel; windowLevel = NSModalPanelWindowLevel;
// Tooltips should appear above StayOnTop windows. // Tooltips should appear above StayOnTop windows.
if (type == Qt::ToolTip) if (type == Qt::ToolTip)
windowLevel = NSScreenSaverWindowLevel; windowLevel = NSScreenSaverWindowLevel;