浏览代码

Merge pull request #75475 from RedworkDE/no-clamp-unembedded

Do not clamp non-embedded window size to embedder
Yuri Sizov 2 年之前
父节点
当前提交
499493340d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/main/window.cpp

+ 1 - 1
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);