From aa604c5c479afd0c44af1f8971c5b50489f5602e Mon Sep 17 00:00:00 2001 From: RedworkDE <10944644+RedworkDE@users.noreply.github.com> Date: Wed, 29 Mar 2023 22:35:07 +0200 Subject: [PATCH] Do not clamp non-embedded window size to embedder --- scene/main/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/main/window.cpp b/scene/main/window.cpp index d5733b6feb..0588a116a8 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1564,7 +1564,7 @@ void Window::popup(const Rect2i &p_screen_rect) { ERR_PRINT(vformat("Window %d spawned at invalid position: %s.", get_window_id(), position)); set_position((parent_rect.size - size) / 2); } - if (parent_rect != Rect2i() && is_clamped_to_embedder()) { + if (parent_rect != Rect2i() && is_clamped_to_embedder() && is_embedded()) { Rect2i new_rect = fit_rect_in_parent(Rect2i(position, size), parent_rect); set_position(new_rect.position); set_size(new_rect.size);