diff --git a/main/main.cpp b/main/main.cpp index e371bef25fc..1c02fcf939c 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -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; } } diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index 3b829502245..c4a5849d43e 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -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]; } }