diff options
Diffstat (limited to 'scene/main/window.cpp')
| -rw-r--r-- | scene/main/window.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 5054e18a7a..a2a49aea75 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -104,19 +104,22 @@ void Window::set_max_size(const Size2i &p_max_size) { } _update_window_size(); } -Size2i Window::get_max_size() const { - return min_size; +Size2i Window::get_max_size() const { + if (window_id != DisplayServer::INVALID_WINDOW_ID) { + max_size = DisplayServer::get_singleton()->window_get_max_size(window_id); + } + return max_size; } void Window::set_min_size(const Size2i &p_min_size) { - min_size = p_min_size; if (window_id != DisplayServer::INVALID_WINDOW_ID) { - DisplayServer::get_singleton()->window_set_min_size(max_size, window_id); + DisplayServer::get_singleton()->window_set_min_size(min_size, window_id); } _update_window_size(); } + Size2i Window::get_min_size() const { if (window_id != DisplayServer::INVALID_WINDOW_ID) { min_size = DisplayServer::get_singleton()->window_get_min_size(window_id); @@ -338,6 +341,10 @@ void Window::_event_callback(DisplayServer::WindowEvent p_event) { _propagate_window_notification(this, NOTIFICATION_WM_GO_BACK_REQUEST); emit_signal("go_back_requested"); } break; + case DisplayServer::WINDOW_EVENT_DPI_CHANGE: { + _propagate_window_notification(this, NOTIFICATION_WM_DPI_CHANGE); + emit_signal("dpi_changed"); + } break; } } @@ -1360,7 +1367,6 @@ void Window::_bind_methods() { ADD_SIGNAL(MethodInfo("close_requested")); ADD_SIGNAL(MethodInfo("go_back_requested")); ADD_SIGNAL(MethodInfo("visibility_changed")); - ADD_SIGNAL(MethodInfo("files_dropped")); ADD_SIGNAL(MethodInfo("about_to_popup")); BIND_CONSTANT(NOTIFICATION_VISIBILITY_CHANGED); |
