Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Fix Window size changes ignored when node is not in tree #100746

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down