mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 11:03:13 -05:00
Merge pull request #100746 from syntaxerror247/size-regression
Android: Fix `Window` size changes ignored when node is not in tree
This commit is contained in:
commit
a7fb67b827
1 changed files with 3 additions and 3 deletions
|
@ -399,7 +399,7 @@ void Window::move_to_center() {
|
|||
void Window::set_size(const Size2i &p_size) {
|
||||
ERR_MAIN_THREAD_GUARD;
|
||||
#if defined(ANDROID_ENABLED)
|
||||
if (!get_parent()) {
|
||||
if (!get_parent() && is_inside_tree()) {
|
||||
// Can't set root window size on Android.
|
||||
return;
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ void Window::_validate_limit_size() {
|
|||
void Window::set_max_size(const Size2i &p_max_size) {
|
||||
ERR_MAIN_THREAD_GUARD;
|
||||
#if defined(ANDROID_ENABLED)
|
||||
if (!get_parent()) {
|
||||
if (!get_parent() && is_inside_tree()) {
|
||||
// Can't set root window size on Android.
|
||||
return;
|
||||
}
|
||||
|
@ -498,7 +498,7 @@ Size2i Window::get_max_size() const {
|
|||
void Window::set_min_size(const Size2i &p_min_size) {
|
||||
ERR_MAIN_THREAD_GUARD;
|
||||
#if defined(ANDROID_ENABLED)
|
||||
if (!get_parent()) {
|
||||
if (!get_parent() && is_inside_tree()) {
|
||||
// Can't set root window size on Android.
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue