Merge pull request #41285 from bruvzg/macos_on_top_4
[macOS] Fix "on top" incorrectly set on init and resetting on window update.
This commit is contained in:
commit
d4665e7859
|
@ -1140,7 +1140,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
|
||||
if (bool(GLOBAL_GET("display/window/size/always_on_top"))) {
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_ALWAYS_ON_TOP;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_ALWAYS_ON_TOP_BIT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2374,7 +2374,11 @@ void DisplayServerOSX::_update_window(WindowData p_wd) {
|
|||
[p_wd.window_object setHidesOnDeactivate:YES];
|
||||
} else {
|
||||
// Reset these when our window is not a borderless window that covers up the screen
|
||||
[p_wd.window_object setLevel:NSNormalWindowLevel];
|
||||
if (p_wd.on_top) {
|
||||
[p_wd.window_object setLevel:NSFloatingWindowLevel];
|
||||
} else {
|
||||
[p_wd.window_object setLevel:NSNormalWindowLevel];
|
||||
}
|
||||
[p_wd.window_object setHidesOnDeactivate:NO];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue