Skip to content

Commit 07ee133

Browse files
committed
Merge pull request #106952 from bruvzg/fna_emb_fx
Fix window embedding for windows with `force_native` enabled.
2 parents d6be909 + 4877a96 commit 07ee133

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scene/main/window.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,13 @@ void Window::set_force_native(bool p_force_native) {
13661366
if (is_visible() && !is_in_edited_scene_root()) {
13671367
ERR_FAIL_MSG("Can't change \"force_native\" while a window is displayed. Consider hiding window before changing this value.");
13681368
}
1369+
if (window_id == DisplayServer::MAIN_WINDOW_ID) {
1370+
return;
1371+
}
13691372
force_native = p_force_native;
1373+
if (!is_in_edited_scene_root() && get_tree()->get_root()->is_embedding_subwindows()) {
1374+
set_embedding_subwindows(force_native);
1375+
}
13701376
}
13711377

13721378
bool Window::get_force_native() const {

0 commit comments

Comments
 (0)