Skip to content

Commit

Permalink
Fix Window size changes ignored on Android
Browse files Browse the repository at this point in the history
(cherry picked from commit 9f3067e)
  • Loading branch information
syntaxerror247 authored and Spartan322 committed Jan 18, 2025
1 parent 4b8ec34 commit 6395726
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,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;
}
Expand Down Expand Up @@ -467,7 +467,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;
}
Expand All @@ -490,7 +490,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;
}
Expand Down

0 comments on commit 6395726

Please sign in to comment.