Cocoa: bugfix staysOnTopFlag in combination with transient parent
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>
Tue, 2 Oct 2012 09:28:58 +0000 (11:28 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 2 Oct 2012 11:22:49 +0000 (13:22 +0200)
commit2570c081a16962867a7fca53547462a6f1ecbb84
tree20853129ce7bff2b30e320a578ad528964215d89
parent341dcae472553f20d4ed91897f05637523922c1b
Cocoa: bugfix staysOnTopFlag in combination with transient parent

A staysOnTop window with a parent would never stay on top. The reason
was that we placed the window on the same level as the parent, which
would undermine the staysOnTop flag.

The fix for this is to always level the window to _at least_ as the same
level as the parent, but never lower. A code path for this already
existed in the windowLevel function for popups. so we factor that out
and use it for all cases.

Task-number: QTBUG-27410
Change-Id: I0c30194be33703f54b6c2fe7f3088a9febcd1e2c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
src/plugins/platforms/cocoa/qcocoawindow.mm