diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-12-08 20:34:15 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-12-29 09:43:39 +0200 |
commit | f7955633de42d660a24efafdf32b3bd3b72f6251 (patch) | |
tree | 1d22eaa28ff0b06f781167cd8594a894b08199a5 /scene | |
parent | a75493091823020d858fabadbfa5994da0d658cb (diff) |
Improve `window_set_current_screen` and fix secondary window initial mode and positions.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/window.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index c71c3e195b..f18b712153 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -462,9 +462,8 @@ void Window::_make_window() { } DisplayServer::VSyncMode vsync_mode = DisplayServer::get_singleton()->window_get_vsync_mode(DisplayServer::MAIN_WINDOW_ID); - window_id = DisplayServer::get_singleton()->create_sub_window(DisplayServer::WindowMode(mode), vsync_mode, f, Rect2i(position, size)); + window_id = DisplayServer::get_singleton()->create_sub_window(DisplayServer::WindowMode(mode), vsync_mode, f, Rect2i(position, size), current_screen); ERR_FAIL_COND(window_id == DisplayServer::INVALID_WINDOW_ID); - DisplayServer::get_singleton()->window_set_current_screen(current_screen, window_id); DisplayServer::get_singleton()->window_set_max_size(Size2i(), window_id); DisplayServer::get_singleton()->window_set_min_size(Size2i(), window_id); String tr_title = atr(title); |