You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Do not clamp non-embedded window size to embedder
This commit is contained in:
@@ -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));
|
ERR_PRINT(vformat("Window %d spawned at invalid position: %s.", get_window_id(), position));
|
||||||
set_position((parent_rect.size - size) / 2);
|
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);
|
Rect2i new_rect = fit_rect_in_parent(Rect2i(position, size), parent_rect);
|
||||||
set_position(new_rect.position);
|
set_position(new_rect.position);
|
||||||
set_size(new_rect.size);
|
set_size(new_rect.size);
|
||||||
|
|||||||
Reference in New Issue
Block a user