Skip to content

Commit

Permalink
Merge pull request #89673 from bruvzg/f_na_ed
Browse files Browse the repository at this point in the history
Do not apply `force_native` to the edited scene windows.
  • Loading branch information
akien-mga authored Mar 25, 2024
2 parents 195a2a4 + 92d69da commit d66539e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scene/main/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ void Window::set_force_native(bool p_force_native) {
return;
}
force_native = p_force_native;
if (is_visible()) {
if (is_visible() && !is_in_edited_scene_root()) {
WARN_PRINT("Can't change \"force_native\" while a window is displayed. Consider hiding window before changing this value.");
}
}
Expand All @@ -1224,7 +1224,7 @@ bool Window::get_force_native() const {

Viewport *Window::get_embedder() const {
ERR_READ_THREAD_GUARD_V(nullptr);
if (force_native && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_SUBWINDOWS)) {
if (force_native && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_SUBWINDOWS) && !is_in_edited_scene_root()) {
return nullptr;
}

Expand Down

0 comments on commit d66539e

Please sign in to comment.