From 92d69da7a684b05948ad20d1880f1fc634180cd6 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:39:50 +0200 Subject: [PATCH] Do not apply "force_native" to the edited scene windows. --- scene/main/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 6632dd903394..f168403c8447 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1214,7 +1214,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."); } } @@ -1225,7 +1225,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; }