File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1370,7 +1370,7 @@ void Window::set_force_native(bool p_force_native) {
13701370 return ;
13711371 }
13721372 force_native = p_force_native;
1373- if (!is_in_edited_scene_root () && get_tree ()->get_root ()->is_embedding_subwindows ()) {
1373+ if (!is_in_edited_scene_root () && is_inside_tree () && get_tree ()->get_root ()->is_embedding_subwindows ()) {
13741374 set_embedding_subwindows (force_native);
13751375 }
13761376}
@@ -1502,6 +1502,9 @@ void Window::_notification(int p_what) {
15021502 if (!ProjectSettings::get_singleton ()->is_connected (" settings_changed" , callable_mp (this , &Window::_settings_changed))) {
15031503 ProjectSettings::get_singleton ()->connect (" settings_changed" , callable_mp (this , &Window::_settings_changed));
15041504 }
1505+ } else if (get_parent () && get_tree ()->get_root ()->is_embedding_subwindows ()) {
1506+ // Is not the main window and main window is embedding.
1507+ set_embedding_subwindows (force_native);
15051508 }
15061509
15071510 bool embedded = false ;
You can’t perform that action at this time.
0 commit comments