summaryrefslogtreecommitdiff
path: root/scene/main/window.cpp
diff options
context:
space:
mode:
authorLorenzo Cerqua <lorenzocerqua@tutanota.com>2020-05-12 14:35:11 +0200
committerLorenzo Cerqua <lorenzocerqua@tutanota.com>2020-07-23 07:58:10 +0200
commitd670a49612f76d036dd6f3b23e895a9ca7c1a9ca (patch)
tree63b0b86943551dd63f734437e626e750b0ef7e43 /scene/main/window.cpp
parent0cd98ec7e13038d09a77cf821e930be79026f943 (diff)
DisplayServer: separate window showing into another function
When creating a window, Godot would first register it to the WM(show it) and then set its flags. This works fine on a floating WM, but on tiling WMs as soon as a window gets registered the WM immediately acts on the window by scaling it up and treating it as a generic window, being registered without any special flags. This commit separates the showing of the window into another function and calls it after the most important flags are set, making windows with special flags(eg. all popups) work again on tiling WMs. Fixes #37930
Diffstat (limited to 'scene/main/window.cpp')
-rw-r--r--scene/main/window.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 81f33d74fe..8c985242f1 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -247,6 +247,7 @@ void Window::_make_window() {
}
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_WHEN_VISIBLE);
+ DisplayServer::get_singleton()->show_window(window_id);
}
void Window::_update_from_window() {