Allow custom window level when sending window to top

This commit is contained in:
adammeyer 2016-09-21 13:35:59 -04:00
parent 805ce0dee9
commit fbb3a288ec
7 changed files with 15 additions and 10 deletions

View file

@ -943,8 +943,11 @@ bool NativeWindowMac::IsClosable() {
return [window_ styleMask] & NSClosableWindowMask;
}
void NativeWindowMac::SetAlwaysOnTop(bool top) {
[window_ setLevel:(top ? NSFloatingWindowLevel : NSNormalWindowLevel)];
void NativeWindowMac::SetAlwaysOnTop(bool top, int level) {
if (!level) {
level = NSFloatingWindowLevel;
}
[window_ setLevel:(top ? level : NSNormalWindowLevel)];
}
bool NativeWindowMac::IsAlwaysOnTop() {