summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorMateo Kuruk Miccino <mateomiccino@gmail.com>2020-03-12 20:12:34 -0300
committerMateo Kuruk Miccino <mateomiccino@gmail.com>2020-03-26 15:49:54 +0100
commitf387b9b4f4ef3ae6eba5199b4089ef591f2d7ba2 (patch)
treee9551e973d3b534c769279bba2ad58c7d991d2bf /scene/main
parent9a5d15a2dcb08aa9f3732a0e8e41f2e81c2be365 (diff)
Multiple changes to DisplayServerX11
- Travis: Change x11 to linuxbsd - SCons: Change x11 plataform to linuxbsd - Plugins: Remove ; to avoid fallthrough warning - DisplayServerX11: Implement set_icon - DisplayServerX11: Fix X11 bug when a window was erased from windows map, all the changes from that erased windows are sending to the main window - DisplayServerX11: Reorder create_window commands - DisplayServerX11: Change every Size2 to Size2i and Rect2 to Rect2i where it belongs + More X11 fixes which have been integrated directly back into reduz's original commits while rebasing the branch.
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/window.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index f8a86b0957..6c2e2f1d31 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -99,7 +99,9 @@ Size2i Window::get_real_size() const {
void Window::set_max_size(const Size2i &p_max_size) {
max_size = p_max_size;
- DisplayServer::get_singleton()->window_set_min_size(max_size, window_id);
+ if (window_id != DisplayServer::INVALID_WINDOW_ID) {
+ DisplayServer::get_singleton()->window_set_max_size(max_size, window_id);
+ }
_update_window_size();
}
Size2i Window::get_max_size() const {
@@ -110,7 +112,9 @@ Size2i Window::get_max_size() const {
void Window::set_min_size(const Size2i &p_min_size) {
min_size = p_min_size;
- DisplayServer::get_singleton()->window_set_max_size(max_size, window_id);
+ if (window_id != DisplayServer::INVALID_WINDOW_ID) {
+ DisplayServer::get_singleton()->window_set_min_size(max_size, window_id);
+ }
_update_window_size();
}
Size2i Window::get_min_size() const {
@@ -270,8 +274,8 @@ void Window::_clear_window() {
DisplayServer::get_singleton()->delete_sub_window(window_id);
window_id = DisplayServer::INVALID_WINDOW_ID;
- _update_viewport_size();
+ _update_viewport_size();
VS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), VS::VIEWPORT_UPDATE_DISABLED);
}