From f387b9b4f4ef3ae6eba5199b4089ef591f2d7ba2 Mon Sep 17 00:00:00 2001 From: Mateo Kuruk Miccino Date: Thu, 12 Mar 2020 20:12:34 -0300 Subject: 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. --- scene/main/window.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scene/main') 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); } -- cgit v1.2.3